Updated June 4th, 2019

An easy way to make your site faster is to compress your images.

On Shopify sites, there is a 2 step approach to maximize your compression:

  1. Install a Shopify image optimization app like Crush Pics
  2. Manually compress any images that apps can’t reach, using a tool like TinyPNG.com

Due to API restrictions, image optimization apps aren’t able to get all the images on your site. This is where part 2 (manual compression) comes into play.

So even with an optimization app installed, you might still get warnings in analysis tools like this:

finding images to be optimized

To fix that you’ll have to manually compress them (Step 2 below).

Crush Pics / optimization apps will auto compress:

  • Product images
  • Collection and blog featured images
  • Any images you upload into your Assets folder

These need to be manually compressed:

  • Images uploaded in your Customize Theme section
  • Images inserted inside pages or blog posts
  • Images uploaded to the Files section in your Settings

Step 1: Auto compressing your images

Install Crush Pics and set to automatically compress. For a guide on our recommended settings, check this post out.

Step 2: Manually compressing your images

You can use an online compressor called TinyPNG to manually compress any images (JPG or PNG).

Head to TinyPNG.com and upload your images:

tinypng image compressor

After uploading those same images above that gave warnings in PSI (plus some huge banner images that PSI didn’t detect), we now see they get compressed and save about 3MB… that’s a lot!

file savings from compressing images

Now upload those images back where you got them and enjoy the speed savings 😎

How to find and download images that need to be compressed

You can use the Shopify Analyzer to get a list of images that should be compressed.

Click on the Image compression section and you might see something like this:

finding images to be optimized

Images here can be compressed to save weight.

If you have the original images on your computer, you can upload those to TinyPNG.

If you need to download the files instead, look at the end of the image url:

It will probably look either of these:

  • https://cdn.shopify.com/s/files/1/1339/9941/t/29/assets/image1.jpg
  • or https://cdn.shopify.com/s/files/1/1339/9941/t/29/assets/image1_800x.jpg

If it’s the first example, just right click and download the image, then run it through TinyPNG.

If it’s the second example, the highlighted part in orange is a Shopify image URL filter, meaning it takes the original image and serves up a specific size (to load faster). In this case, open the image in a new tab, then delete the _800x (or whatever the number is) from the url, then load that new url to give you the original image.

Then you can download it and run it through TinyPNG.

*In the screenshot above, they don’t have Shopify image url filters (there are no numbers right before the .png or .jpg), so they can be downloaded as is.

What does image compression do?

Image compression is an essential part of complete image optimization. Here’s what it does

  • Strips unnecessary meta data from the image file
  • Reduces the number of colors in an image
  • Uses algorithms to combine data and similar patterns
  • If you select “lossy” compression (instead of “lossless”), it will further compress by dropping the resolution to make the file even lighter (I prefer “lossless” to maintain optimal resolution, but you have options)

The Future

It would be nice if image compressor apps could cover your whole store, but for now they can’t. If you know of a completely automated solution, feel free to drop it in the comments, but I haven’t found one yet.

In the meantime, I think the extra minute it takes to manually compress your theme and blog post images is worth the speed savings. Faster sites get better conversions, more traffic, better SEO rank, and overall perform better.

Once your images are compressed, you’ll want to make sure your theme isn’t serving any oversized images, and that you’re using JPG instead of PNG for photographic images (we see PNG used often enough that it’s worth mentioning because they can be 2x – 10x the file weight).

More Optimization Ideas

If you want to identify all your optimization opportunities, you can use our Shopify Analyzer to seek the opportunities and how to fix them.

If you prefer having complete image optimization done for you, we handle everything in this post with our Shopify Image Optimization service.

To learn more about optimization, here’s complete guide to optimizing your site: How to Optimize a Shopify site.