$width and $height not pointing to correct array index

Created on 11 August 2025, 6 days ago

Problem/Motivation

I'm trying this module for the first time but no images are getting rendered and there is a 404 for each image style. Using the breakpoint debugger I can see that in onKernelRequest in the section that explodes the $path into $style_parts the $width and $height aren't pointing to the correct $style_parts.

This is because it fails to take into account the image style name is drimage_improved which explodes into two parts drimage and improved. So when it looks for $width at $style_parts[1] it is finding improved and not the actual width.

I'm confused how this is working at all for people?

Steps to reproduce

Use the module normally and add a breakpoint on line 113 of DrimageSubscriber.php

Notice the $style_parts in the debugger as you step through. Also note how the wrong values are added for the $width and $height.

Proposed resolution

Increment the array index to take into account the extra array item.

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

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy tanc Italy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024