Progressive JPEG, or PJPEG, is a format which stores several copies of a photo with different levels of image quality. Meaning that as Facebook is loading a photo, the lowest quality scan will appear first, then slowly load with more and more quality, similar to buffering a YouTube video.
Facebook listed the following reasons for switching to PJPEG:
- Data consumption: PJPEG allows us to skip downloading smaller versions of an image.
- Network connections: Since we don't download smaller versions of an image anymore, we now use only one connection per image instead of many.
- Disk storage: Storing fewer photos on disk decreases the amount of disk space used by the app.
- One URL: Since we no longer need to download multiple images at different sizes, we can simply use one URL.