Photon images lack width/height when cropped/resized, interferes with Lazy Images and scrolling #8191
Labels
[Feature] Lazy Images
[Feature] Photon
aka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins
[Focus] Performance
[Pri] High
[Type] Bug
When a feature is broken and / or not performing as intended
When an image has its dimensions changed via Photon, it cautiously strips the width/height from the tag in order to not display a warped image.
This results in images having a size of 0x0 when they are being first loaded, which in turn causes:
(a) hella page jank as they pop in
(b) lazy load to fire the load event for many more images, since in some degenerate cases you can end up with tons of these 1x1 images in the viewport
Steps to reproduce the issue
(Photon URLs should end up looking something like https://i0.wp.com/testcdn.mystagingwebsite.com/wp-content/uploads/2017/11/c31682d9-3bfd-3c81-adac-e484ac368c49-300x200.jpg?resize=300%2C200&ssl=1 )
What I expected
What happened instead
Suggested solution
<img>
tag to be the expected width/height of the image.More info:
Photon images were rendered without width and height, like this.
The text was updated successfully, but these errors were encountered: