Navigating Image File Types

High quality images can help your site appeal to users. But how do you know which file extension to use? JPGs and PNGs can appear, visually, exactly the same. But there are some differences between the two that can affect the quality and loading speed of your images.

Image Compression

 

Small images are easy to transfer and store, and load quickly. Therefore, compression a necessary part of featuring images on your site. Compression will remove some data from your file though, which occurs in one of two ways: lossless compression and lossy compression.

 

Lossless compression

Lossless compression removes data from your image, but it also indicates how the file can be reconstructed. Lossless compression removes information without changing the structure.

 

Example:

“sssssssoooooooooooo” can be compressed to “s7o12”

 

Lossy Compression

In a lossy compression, when an image is compressed, the information is removed for good. You cannot reconstruct the image as it was. Moreover, every time an image is saved in this way, it continues to lose data, which can result in a loss of quality. An example of this would be MP3 files, which don’t contain all of the audio in the original recording.

JPG

 

JPG stands for Joint Photographic Experts Group. Most photos on websites and social media platforms are JPGs.

  • Favored for photos instead of graphics
  • Best choice for screenshots
  • Saved on a white background
  • Smaller than PNGs
  • Fast page load times
  • Lossy compression, but also allows control over compression ratio
  • Editing and resaving many times will degrade quality

 

PNG

 

PNG stands for Portable Network Graphic. Logos, for example, are generally saved as PNGs.

  • Used for illustrations and other types of graphics.
  • Saved on a transparent background. This allows it to blend seamlessly with your site.
  • Supports a range of colors and greyscale
  • You can change the color if you want to update your graphic
  • Fewer colors used means the file can shrink smaller
  • Lossless compression.

When saving as a PNG, keep the image high quality, since PNGs retain more details. Choose a PNG if you are going to edit and save the photo multiple times or if you have text.

 

GIF

 

GIF stands for Graphics Interchange Format. These are used for short, animated video loops.

  • Supports animation
  • Limited color range
  • Smaller than JPGs
  • Lossless compression

 

 

I hope that this information has helped you better understand the differences between these three file types. Let us know in the comments below if you have any additional questions.