Image explicit width and height attributes missing if size set to custom
-
When adding an image and setting image resolution to “custom” and enter own width and height, the width and height attributes are missing in front end output:
<img decoding="async" src="https://example.com/wp-content/uploads/elementor/thumbs/Example-qhwv2uuiwwv6cndr8u16r3gzxwf2rr81yghipe2xk8.jpg" title="Example" alt="Example" loading="lazy" />
This is bad and leads to Cumulative Layout Shift (CLS) errors e.g. in Google PageSpeed Insights and other Lighthouse tests.
Set an explicit width and height on image elements to reduce layout shifts and improve CLS. Learn how to set image dimensions
Please add width and height attributes of the created thumbs, thanks.
Elementor 3.18.3, Hello Elementor 3.0.0, WordPress 6.4.2, PHP 8.1.x
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Image explicit width and height attributes missing if size set to custom’ is closed to new replies.