The Ultimate Guide to Image Compression
Everyone's been there: you try to attach a dozen photos to an email, only to have it rejected because the message is too large. Or you try to upload an image to a website but you can't because, again, it's too large.
Indeed, it was the need to send images across a wire by email that prompted the first highly compressed image format, the GIF, or Graphics Interchange Format. But the GIF suffered from quality issues and, later, royalty issues, and was rapidly superseded by the PNG and JPEG formats.
Today, so many formats exist that it's hard to keep up. Specialized software is required to compress each of these formats. A common tool is Photoshop, which requires a paid subscription to use.
A free version also exists, but what a hassle to learn how to edit photos simply for the purpose of sharing a few images with friends or uploading them to a website, right?
That's why we developed ImageCompressor.com, an extremely simple, totally secure image compression website that doesn't require you to have any knowledge of formats or how to edit photos.
Below, we walk you through every detail you need to know to use our free image compressor.
Secure Image Compression
Traditional image compression services typically send your file to their servers to process it.
This is unfortunately a privacy risk. You have no idea what happens to the original image, or where it's stored.
For example, let's say you're a business in Europe that must compress a series of images containing personal client information. If you upload those images to a server outside the European Union, you're potentially violating Europe's strict privacy laws, which carry massive fines.
Other reasons might exist for not wanting to upload images to an external service. They might be private images of your family. Or they might contain sensitive business information.
ImageCompressor.com solves this by ensuring that the image you upload never leaves your computer.
We use the latest web technology to process the image entirely inside your browser, maintaining 100% privacy and security.
Step-by-Step Guide: How to Use ImageCompressor.com
Different image formats use different compression algorithms. ImageCompressor.com works with these individual algorithms to allow you to tweak the image's compression and obtain just the right quality/compression balance for your needs.
For example, JPEGs use a "lossy" compression algorithm, meaning that they permanently discard parts of the image that the human eye doesn't always notice. However, PNGs use a "lossless" compression algorithm, which is better suited for high-contrast images and images with plenty of detail.
PNGs are therefore usually larger than JPEGs, but maintain more quality. To achieve higher compression for PNGs using ImageCompressor, we must reduce the number of colors in the image, which you can tweak yourself during the compression process.
Let's walk through the different options for compressing images:
Compressing JPEG Images
To compress a JPEG image, first upload one or more JPEGs by either dragging them from your computer or clicking the "Select Files" button.
JPEGs use a "quality" setting when compressing images. The most common setting for online images is 80%. Lower than that, and the human eye starts to notice minor quality issues.
ImageCompressor.com uses 80% as the default setting, but you can modify it after uploading your image.
You would normally use a higher quality setting if you plan on printing the image, or if you plan to do further edits on it. Lower settings are preferred when quality needs are minimal and you just need a really small file size, such as when emailing the image.
When you adjust the quality, ImageCompressor.com gives you an estimate of what the file size might be at the new setting before you apply it.
After changing the quality setting, click "Apply."
As you can see below, the quality of a 60% compressed image is still quite good for general online images. Of course, if you're hosting a photography website, you'd want the highest quality possible, but you can tweak all of it on ImageCompressor.com.
Compressing PNG Images
PNG images use a lossless compression format, meaning that the only way to achieve greater compression is to reduce the number of colors in the image.
To compress a PNG image on ImageCompressor.com, follow the same procedure for uploading as above for JPEGs, selecting the image(s) from your computer, and then clicking "Compress" when you're done.
However, in the case of PNGs, a "Colors" label replaces the "Quality" label. By reducing the number of colors in the color palette, you can reduce the image's size.
The quality/compression ratio in PNGs is impressive, even with a significantly reduced color palette, as shown below in our test image.
We reduced the color palette for our test image far lower than people normally would, down to 154 colors, and the image still looks excellent, but the compression is phenomenal: from 23 MB down to less than 1 MB.
The purpose of your compression will inform the number of colors you choose for the palette. Web images should maintain more of their original integrity, but if you only want to share concepts of something via email, reducing the color palette significantly won't matter much.
Compressing WebP Images
Google created the WebP format in 2010 as an effort to combine the best of JPEG, PNG, and GIF into one format. Tests conducted by Google reveal that WebP achieves significantly higher compression than JPEG images for the same quality index.
Our WebP compression tool therefore uses the same quality scale as JPEG, but the images are significantly smaller than JPEG compression.
You can see the difference below. The WebP file (which was already significantly smaller than the JPEG file) was reduced even further compared to the same file when compressed to a 50% level of quality.
Compressing GIF Images
The GIF was the first format to focus on compression. It emerged before the internet, so the creators paid more attention to file size than quality.
As a result, the GIF is limited to a color palette of 256 colors. That's why GIF images often appear "grainy" or "vintage," because they can't support the millions of colors captured by modern cameras.
Nonetheless, GIFs have a tiny footprint. Compressing them even further follows a similar pattern to compressing PNGs, by removing colors.
If you'd like more compression of your image after uploading it to ImageCompressor.com, adjust the color slider on the right and then click "Apply."
Compressing SVG Images
The SVG (Scalable Vector Graphic) is a unique image format because it isn't made up of pixels. Instead, it's made of mathematical instructions that tell the computer how to draw the image on the screen. These mathematical instructions are called vectors.
Because SVGs don't contain pixel data, they're infinitely scalable, allowing you to make them endlessly large as needed.
In images made of pixels, the computer stores a grid of colored squares. When you zoom in, those squares get bigger and the image looks "blocky." In a vector image, the computer stores a formula like "draw a circle with a radius of 5." No matter how much you zoom in, the computer just recalculates the formula, keeping the edge perfectly sharp.
The ability to scale endlessly up or down makes SVGs popular as web interface elements, such as logos and icons. Modern websites are viewed on everything from tiny phones to giant 4K monitors, and an SVG is the only way to ensure a logo looks sharp on every single screen without needing to save multiple versions of the file.
SVGs remain the industry standard for this use case. However, they aren't useful for photos or complex images with millions of different colors.
When compressing SVG files, ImageCompressor.com gives you a "Precision" option which determines the mathematical precision of each vector. Values with high precision mean more decimal points after a number, which equals a larger file.
For example, an SVG might have the following rectangle defined inside it:
<rect x="-68.953" y="-103.241" width="3663.125" height="2460.237" />
This SVG uses a precision scale of 3, which is why each value has three numbers after the decimal point. In an unoptimized SVG, these numbers might be very long, which is highly inefficient, especially if you only want to paint a single dot on the screen!
Below, you can see the precision option when compressing SVGs on ImageCompressor.com.
In our test below, the original SVG had a precision factor of three, and we reduced it to zero with no noticeable loss of quality or accuracy in the compressed file.
Summary
Image compression is often needed. Unfortunately, compressing an image typically requires installing software on your computer, or uploading the image to a server that's not under your control. This is a no-go for sensitive images.
Editing images locally also requires technical skill that most people don't have and don't want to spend time learning.
Image compression should be simple, easy, and secure, which it is with ImageCompressor.com. No need to install software, and all images stay 100% on your device. Best of all, it's totally free to use.