Loading resized images in layers on slow connections #371
-
Having implemented ImageSharp and resizing images used for background image in Hero top of the page. Image does not load like this without the resizing utility, and having tried format/encoder WEBP and JPEG. Are there any solutions not to load images in this way? /my-image.jpg?format=wepb&quality=90&width=1920&height=1080
Skarminspelning.2024-07-11.111523.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The behavior you are describing is characteristic of the progressive decoding process used in WebP images, specifically for the lossy WebP format. Progressive decoding allows an image to be partially decoded and displayed before the entire file has been downloaded, improving the perceived load time on slow connections. Here’s a breakdown of how this works:
This progressive decoding technique is particularly beneficial for users on slow connections, as it allows them to see a quick preview of the image, improving the user experience while waiting for the complete image to load. Progressive decoding in WebP is similar to other formats like JPEG 2000 and interlaced PNGs, where multiple passes refine the image quality progressively. Switching to lossless WebP would prevent the staged decoding behavior you described. Here’s why:
While lossless WebP images eliminate the staged decoding issue, they typically have larger file sizes compared to lossy WebP images, which can lead to longer download times, especially on slow connections like 3G. It’s a trade-off between avoiding progressive rendering and managing file sizes and download speeds. If you prioritize preventing the progressive appearance of images, using lossless WebP is a viable solution. However, be mindful of the potential impact on loading times and bandwidth usage. |
Beta Was this translation helpful? Give feedback.
The behavior you are describing is characteristic of the progressive decoding process used in WebP images, specifically for the lossy WebP format. Progressive decoding allows an image to be partially decoded and displayed before the entire file has been downloaded, improving the perceived load time on slow connections. Here’s a breakdown of how this works:
Initial Decoding (Grayscale or Low-Quality Color): The WebP format first decodes a low-quality preview of the image. This initial pass often involves only the luminance (grayscale) data, giving a quick but rough idea of the image's overall structure and content. This step is fast because it processes less data.
Intermediate Decoding…