Mobile app version of vmapp.org
Login or Join
Heady270

: How to progressively display images on websites I want to display images on my websites just like Facebook and other websites display images now - progressively i.e a complete blurred image first

@Heady270

Posted in: #Ajax #Images #WebsiteFeatures

I want to display images on my websites just like Facebook and other websites display images now - progressively i.e a complete blurred image first and then the whole sharp images loads.

I am not sure about the technical term here but they seem to be pre-fetching a lossy version of images and then download the rest of data.

How can I achieve this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

2 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce454

Lazy-loading images might be your answer.
Consider this www.appelsiini.net/projects/lazyload
It delays loading of images in long web pages. Images outside of viewport (visible part of web page) wont be loaded before user scrolls to them. This is opposite of image preloading.
Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images.

<img data-original="img/sharp.jpg" src="img/blurry.jpg">

10% popularity Vote Up Vote Down


 

@Kimberly868

The easiest way to achieve this is to use Progressive JPG encoding. This effectively creates several images each one more compressed than the last, though only one image is actually stored in the file.

When the file is displayed the lowest resolution version is displayed first - the blurred image - and as each subsequent image is downloaded it's displayed until the highest resolution image is seen.

The drawback with this approach is if the user's browser doesn't support Progressive JPGs and waits until it's downloaded all of the information before displaying anything.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme