Problem/Motivation

I made a first attempt to integrate the changes from this module back to drimage and ran into a few issues.
Just wanted to have you thoughts/input on my findings before I try to continue.

Steps to reproduce

1/ when not using image_widget_crop nor focal_point the width/height is not calculated correctly: (DrimageSubscriber.php: 123-126)

2/ Images with a space in them are never found (%20 in URL)
The image styles are correctly created and styled images are put there, but the keep giving 404 / not found. Also with direct URL's. (might be an issue on our end, still unsure)

3/ Sometimes random images give a 404 on some devices, not on others... Haven't been able to pinpoint what causes this. Be interesting to know if you have experienced this?

Proposed resolution

Original:

      else {
        $width = $style_parts[2];
        $height = $style_parts[3];
      }

Changed to make it work:

      else {
        $width = $style_parts[1];
        $height = $style_parts[2];
      }

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ✅ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release drimage_improved-1.0.8

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3487558 by weseze: Fixed incorrect width/height without image_widget_crop or focal_point

Comments

weseze created an issue. See original summary.

rajab natshah’s picture

Title: Issues when trying to backport changes to drimage » Fix incorrect width/height without image_widget_crop or focal_point

  • rajab natshah committed 9c6bfcb4 on 1.0.x
    Issue #3487558 by weseze: Fix incorrect width/height without...
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +drimage_improved-1.0.8
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: josebc » Unassigned
Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.