Lossy vs Lossless Compression Differences and When to Use

Anyone who wants to upload digital photos, or save storage space when handling them, needs to be aware of image compression. This reduces the size of a file by removing or reworking data and optimising it for use — making it easier and quicker to retrieve photos, transfer them and post them online.

 

In this guide, we’ll compare the two main methods — lossy and lossless compression.

side by side comparison of lossy and lossless frog images

What are lossy and lossless compression?

Data compression can be used to reduce the size of digital files, meaning they take up less space.

 

Whether you’ve just started out with digital photography, or are a seasoned pro, compression is important, because digital images can be enormous in their original size – making them far harder to handle.

 

But not all forms of compression are the same.

 

What are the two types of data compression?

There are two methods of compression – lossy and lossless.

  • Lossy reduces file size by permanently removing some of the original data.
  • Lossless reduces file size by removing unnecessary metadata.

 

Lossy algorithms.

Lossy compression is typically used when a file can afford to lose some data, and/or if storage space needs to be drastically ‘freed up’.

 

Here, an algorithm scans image files and reduces their size by discarding information considered less important or undetectable to the human eye.

 

Using lossy methods therefore requires you to make a balanced judgement between:

  • storage/delivery requirements
  • loading times (e.g. on the web)
  • image quality

 

Lossless algorithms.

With lossless compression the file data is restored and rebuilt in its original form after decompression, enabling the image to take up less space without any discernible loss in picture quality.

No data is lost and as the process can be reversed, it’s also known as reversible compression.

young-man-at-work-with-pics-on-computer

The differences between lossy and lossless compression.

 

 

Lossy

Lossless

What it does

Permanently removes file data.

Restores and rebuilds compressed data.

When it’s used

When file information loss is acceptable.

When file information loss is unacceptable.

Applications

Images, video, audio

Text, images, audio

File types

Images: JPEG

Video: MPEG, AVC, HEVC

Audio: MP3, AAC

Images: RAW, BMP, PNG

General: ZIP

Audio: WAV, FLAC

online-portfolio-tablet-and-pencil

Advantages and disadvantages of lossy and lossless compression.

 

 

Lossy

Lossless

Pros     

Small file sizes. Ideal for web use. Lots of tools, plugins and software support it.

No loss in quality. Slight decreases in file sizes.

Cons

 

 

Quality degrades due to higher rate of compression.

Compressed files are larger than lossy files.

When to use lossy vs lossless image compression on your photos.

Lossy is better suited than lossless to some tasks, and vice versa.

 

Here are some common lossy and lossless compression examples to help you decide.

  • Updating your website – lossy is the best option here, as the significant reduction in file size will create faster load times.
  • Creating an online portfolio – lossless is the ideal choice. You want your photos to look impressive, so image quality is more important than load time.
  • You’re running out of hard drive space – if you need to free up lots of space, and that’s more important than the quality of the pictures, consider lossy.
  • You save your pics to a cloud service and are running out of space – if you can afford to lose image quality, you could use lossy. Or, if you want minimal loss of quality, consider buying more storage space and use lossless instead.
  • Sharing a selection of event photographs – if this is a large number of smaller or thumbnail pictures, use lossy. The pics can be sent online in higher volumes. If you are sharing a smaller section of curated, quality snaps, then lossless might be best.
  • You have lots of images to go on your site that can be displayed in a small size – ensure your site loads quickly with lossy.
  • Turning an image into a PNG logo – PNG pictures are lossless, so use this to maintain maximum quality.

 

Top tips for selecting a compression type

  • Lossy vs lossless compression is always going to be a trade-off between image quality and file size, so find the right balance for your task.
  • There’s no ‘right and wrong’ – you can find the method that works best for you by trying both, and using different software.
  • Consider loading speed, image quality, number of images you are sending, or including on your website.
  • Lossy is search engine optimisation (SEO) friendly. Search engines rank sites with quicker load times. So, if you have your own photography site and want more business, it’s worth thinking about.
  • Many content management systems (CMS) use compression before adding pictures online.

 

Adobe’s quality range of image editing software has everything you need to get started and find what’s best for your photography.

 

Check out:

leaves on a twig split by lossy and lossless compression

Lossy vs lossless summary.

When it comes to digital images, it’s not simply a case of taking pictures and uploading them to a server, folder or website. Before compression, digital pictures can be huge in size – but you need to find the right kind of compression for your images and files.

  • Lossy will save you the most space, but can affect your image quality.
  • Lossless saves less space, but won’t usually impact your image quality.

 

For the best results, professional photo-editing software is great for getting the best out of your digital images. Some offer both lossy and lossless compression too, which will make deciding easier.

 

Whatever your need, Adobe applications can help with compressing your portfolio. Adobe Photoshop, Photoshop Express, Adobe Lightroom and Lightroom Classic all offer lossy and lossless compression.

 

Lossy vs lossless compression: FAQs.

 

Is lossy compression better than lossless?

No type of compression is universally ‘better’ than the other. It all depends on your circumstances. If you need to reduce the size of your files significantly to save storage space online or on your computer, or you need to boost user experience (UX) or SEO on your photography website, lossy is probably your best option. If you need to maintain the highest possible standards of quality, lossless might be your answer.

 

Is PDF lossy or lossless?

Sometimes, PDF files need to be converted to and from JPG (lossy) or PNG (lossless) formats. As PDFs create exact replicas of the files you want to duplicate, they’re lossless, but bear in mind if you’re converting to or from JPGs, the images might be lower quality than if you used PNGs.

 

What is the difference between lossy and lossless images?

After compression, lossy files are smaller in size than lossless ones. However, the quality is usually lower than it would be if you’d used lossless compression. That said, it may not be too noticeable, depending on how you are viewing the image and the type of image it is. Common differences include visible artefacts (‘blockiness’) and there may be some colour degradation.

man-with-glasses-looking-at-camera