Images using Focus module with Focus Scale and Crop do not output widths

Created on 16 October 2015, about 9 years ago
Updated 19 September 2023, about 1 year ago

When you choose image styles on your Images with Styles (and probably normal picture mappings) where the last image style item is using the Image Focus module, it will not output the width on the 'w' descriptor in the srcset attribute:

<img src="http://apexanalytix.localsite/sites/default/files/styles/team_member/public/team_members/green.jpg?itok=CjodlnCz" srcset="http://apexanalytix.localsite/sites/default/files/styles/team_member_2x/public/team_members/green.jpg?itok=0p042EqO w" alt="" sizes="210px">

It seems, in addition to that fact, something breaks where not all srcset images get displayed in the list. See photo where I had multiple image styles selected: https://www.dropbox.com/s/2gjaxkhh44hrjuw/Screenshot%202015-10-16%2015.3...

If you use normal scaling and cropping, or add another core effect after the focus scale and crop, the correct output appears:
https://www.dropbox.com/s/iztm0mvwudbwgff/Screenshot%202015-10-16%2015.3...
<img src="http://apexanalytix.localsite/sites/default/files/styles/team_member/public/team_members/green.jpg?itok=CjodlnCz" srcset="http://apexanalytix.localsite/sites/default/files/styles/team_member/public/team_members/green.jpg?itok=CjodlnCz 210w, http://apexanalytix.localsite/sites/default/files/styles/team_member_2x/public/team_members/green.jpg?itok=0p042EqO 420w" alt="" sizes="210px">

I wasn't sure if I should have submitted the bug here or on the Image Focus module's issue list.

πŸ› Bug report
Status

Closed: outdated

Version

2.13

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States johnny5th

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom lesleyfernandes

    I am closing all very old tickets that have not received comments for a long time. If someone still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.

Production build 0.71.5 2024