If you have ever waited on a site with large image files to load, you have seen why image compression is necessary. To compress images means you take away or regroup parts of an image so that it takes up less space.
There are two basic algorithms used for compression – lossy and lossless. Lossy compression makes changes that create lower quality images. The smaller you make the file, the more noticeable your differences between the original and the compressed file become.
Lossless compression algorithms don’t discard any information, so they result in larger files than lossy compression generates. Lossless compression finds better ways to store the information, and the picture does not lose any quality.
Types of images
First, let’s take a look at four of the most popular image types.
JPEG images (Joint Photographic Experts Group) are “lossy” images. They use a scale of compression that decreases the image’s file size substantially. It eliminates as much information as possible from the file by deleting data your eyes won’t notice. However, if you make the image too small, the result will have more obvious pixelation. The images also have more artifacts, which are features on a compressed image not in the original. JPEGs have 24-bit color with up to 16 million colors available.
The Graphics Interchange Format (GIF) compresses images in two ways. One, it reduces the number of colors. GIF images have an 8-bit palette and only 256 colors. It also replaces large patterns with smaller ones. So, if there are five kinds of blue, GIF will represent them as one. It is both lossy and lossless depending upon the picture you are compressing. A picture with fewer than 256 colors, will not lose any quality. However, if you have a full-color photo, it can lose up to 99.998% of the color.
TIFF is a very flexible format that can be lossy or lossless. Most TIFF files are not compressed, and their high quality makes them perfect for storing graphics and printing. These image files contain all the details of the storage algorithm and all the colors, so they are very large. Their large size requires a long transfer time, slows loading time, and uses a significant amount of disk space.
Portable network graphics or PNG files is a lossless compression, so it does not cause loss of quality and detail. The compression is completely reversible, meaning the image will be recovered precisely as it was sent. PNG finds patterns in the image to use to compress the size. This file type uses only 256 colors but saves the information about those colors quite efficiently. It also supports 8-bit transparency.
Reasons to compress your images
The most common reason for compression of images is to optimize your website. Sites with uncompressed images can take a much longer time to load. Long load times will cause more of your customers to abandon your page in search of another one.
If you have pictures you want to send over email, you need to be aware of what the file size limit is for attachments with your service. If your file is too large, you won’t be able to send it, and even if you can send it, it may transfer too slowly.
Compressing your images will reduce the amount of space you need to store them. If you compress your images, they won’t take up as much space, preventing the need to purchase more storage.
Two free, useful online tools
There are many different tools available to compress images. Two of them are Optimizilla and CompressNow. With both these services you can upload multiple images at one time and preview the result of the compression before you download it.
Both tools use a simple drag-and-drop method for uploading your image files and the ability to upload using the file manager. You can download all the files you compressed together, or you can do it one at a time. When you download your images, they will keep their original names but will have a tag added to the end of the file such as “-min” or “-compressed.”
When you use CompressNow, you choose the compression level before you compress the file. You can upload up to ten JPEG, GIF, or PNG files at a time up to 9 Mb.
Optimizilla gives you the option to upload up to twenty JPEG or PNG images at a time and displays the photos before and after optimizing, and you can change the optimization level for each photo.
For WordPress users
If you are using WordPress for your online sites, we have previously covered some of the best image optimization plugins you should use for your site. This site uses Kraken.io image optimizer, though many would recommend WP Smush, which comes with more features.
Whether you need to speed up your website or send pictures over email to Grandma, you should consider using one of these tools to compress the images. What other tools have you used?