How Facebook load images so fast ??

Wondering about how Facebook load images very fast and also use less data ? Check out this article to know more !

According to a report by Facebook community, At the very beginning Facebook was struct in loading images slow as other sites. This resulted in a massive loss of visitors and many of the people where migrating to different social websites. To stop this Facebook came with a new technology where it used less data and also loaded images very fast.

Now the questions is how images are loaded fast ? What was that technology?

Facebook's Technique :

The first thing facebook done is they compressed the background image by using various tools.

Secondly Facebook added a code in its database on which before any actually load of the original image a low-resolution variant of the original image is loaded thus visitor see blured image in just miliseconds and may opt on a wait for full resolution.

Facebook reduced the resolution of the image from 9864x5492 pixels to 30x12 pixels. This results in an image size less than equal to 900 bytes.

Now the problem was a low-resolution blurred image as a background. To solve this Facebook first load the images in the low-resolution and already load the high-resolution image asynchronous in the background. Once the high-resolution image is loaded then theh low resolution is changed with the high -resolution image.
To accomplish this Facebook used the following javascript loaded in before the end body tag. This way the script does not render-blocking other page content.