Responsive images aspect ratio
-
Hi,
I’m wondering if the aspect ratio feature is supposed to work on responsive images. My images have width / height attributes set, but to be responsive they are set to 100% width and auto height in the css.
The data-aspectratio is being correctly read and set, but there is still layout shift, and before the images load they are just square boxes. I suspect this is because they are responsive but I’m not sure.
I read one option to resolve this is to use a placeholder SVG with the viewbox parameter set to the aspect ratio (described here: https://css-tricks.com/preventing-content-reflow-from-lazy-loaded-images/) and wondered if this might be something that could be implemented in this plugin as an option?
Thanks!
Laurence
The page I need help with: [log in to see the link]
- The topic ‘Responsive images aspect ratio’ is closed to new replies.