thiagowfx's avatar

¬ just serendipity 🍀 (not just serendipity)

Optimize images

• 75 words • 1 min • updated

⚠️ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.

I like to use oxipng to optimize PNG (and other) images.

There’s a pre-commit hook available, therefore enforcing it is a breeze:

yaml
- repo: https://github.com/shssoichiro/oxipng
  rev: v9.1.3
  hooks:
    - id: oxipng

Surely you could run it in github actions as well, if you don’t use pre-commit.com.

If I need to use it as an one-off, I can either run the oxipng binary directly, or use a web version such as Squoosh (via Simon Willison).