How to optimize images

This explains how to optimize images using pngquant. More info at https://pngquant.org/.

What it does

Reduces the file size of PNG images.

Why?

Based on a Google article about image optimization: Image Optimization

What to do

Note: This is for Mac users with Homebrew installed.

  1. Run the following commands in the terminal
# Install pngquant using Homebrew
$ brew install pngquant
  
# Go to the directory with your images
$ cd path/to/your/images
  
# Convert all PNG files in the directory
$ pngquant 256 *.png