Print this article

What's the difference between a GIF and a JPG?

A woman looks at some images on screen

There are many file formats available for saving and emailing images. But, in general, you should use JPEG, GIF or PNG because they are widely supported and the file sizes are small - making them efficient to transmit and store.

WebWise Team | 10th October 2012

The image you see on a computer screen is made up of pixels (for picture elements). The more pixels in an image the higher the resolution - which means you can see finer detail. When an image is stored as a computer file it must organise the information about what colour each pixel should be in a standardised way so the computer knows how, and in what order, to display them.

Commonly-used formats

There are many standard file formats, but only a few of them – primarily JPG, GIF and PNG – are commonly used on web pages or for sending by email.

The basic reason is size - big files take longer to transmit, so smaller files are preferred for emailing. To keep file sizes manageable, most commonly-used file formats compress the data.

There are two types of compression: ‘lossless’ - where the data is not compressed as much but the file sizes tend to be larger and ‘lossy’ - where the file format is more efficient but you will lose some of the finest details.

JPEG is a lossy file format, but it is widely used for distribution via the web or email because it gives enough detail while being very efficient.

GIF and PNG are both lossless formats, but they can still be very efficient for images with large areas that are all one colour. GIF is supported by all web browsers because it came into use in the 1980s. PNG, which is not supported by all browsers, was developed as a free alternative to GIF after a patent dispute arose in the 1990s. (The GIF patents have since expired.)

Three other formats

You might also encounter some other file formats:

  • TIF or TIFF (for Tagged Image File Format) is widely used in the printing business, for the output of document scanners and for storing high-quality photographs. Depending on how it is implemented, it can be either lossless or lossy - either way, the files are typically quite large so it's not a good option for emailing. TIF also has many variants, and they're not all compatible with all programs.
  • BMP is the standard image format used for graphics elements within Microsoft Windows. BMP is an uncompressed format, so the files are very large. You should not use it to store your own images, and you should not use it on web pages or for emailing.
  • RAW is the image taken by a camera's sensor before processing, the equivalent of a digital negative. Most cameras also offer the choice of saving these images as JPGs at varying levels of resolution and file size. RAW is not a standardised image format and varies from camera to camera (as does naming these files). It is useful for saving as much of a picture's data as possible for later processing. You should not send RAW files by email or use them on the web.

Word of caution!

A warning about copyright. Do not put an image that does not belong to you on a web page, unless you have cleared the use of that image with the owner. Many small businesses have been pursued for large sums of money when they have failed to ensure that they have the rights to use the image. Do not let this happen to you.


The WebWise 'W'

WebWise Team

WebWise was first launched in 1998 and since then has helped people of all ages to learn about and love the internet.