Apply image style dimensions with HTML attributes

Created on 9 April 2020, about 4 years ago
Updated 29 February 2024, 4 months ago

I know that an SVG image is scalable (as its name states), so doesn't really need to be processed to be resized, as said in #3109170: Image style not applied → .
I also know that some toolkits still process those image files (simply change default size in metadata, I guess): #3076311: Use image style when configured toolkit supports SVG → .

But still, with the standard GD toolkit, there may be cases where we display a styled image field and don't know if the value will be an SVG, JPG,... In that case, it would be nice to be able to take the dimensions of the image style defined in the formatter settings to display the SVG image, instead of having to specify the SVG dimensions manually (what if image style dimensions change afterwards,...).

This can be done easily with HTML width and height attributes.

✨ Feature request
Status

RTBC

Version

3.0

Component

Code

Created by

🇫🇷France GaëlG Lille, France

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.

Production build 0.69.0 2024