Image style is incorrectly using the original image's width and height attributes on the <img> tag

Created on 20 May 2021, over 3 years ago
Updated 19 September 2023, about 1 year ago

Problem/Motivation

  • My original image is 1080x1920
  • my image style has one action "Scale 1500x1000" with no upscaling.
  • The style is correctly generated at 563 x 1000
  • However the img tag themed by the picture module has the src to the image style url (correct), but width and height attributes of the original image (incorrect).

This causes the image to be stretched, even if I have max-width:100%; on the css for the img tag.

I currently have Lazy load and aspect ratio unchecked, but the same thing happens regardless of checking those boxes.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

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