Skip to content

Instantly share code, notes, and snippets.

@gielcobben
Last active April 16, 2024 23:38
Show Gist options
  • Star 25 You must be signed in to star a gist
  • Fork 15 You must be signed in to fork a gist
  • Save gielcobben/64f820de086998d9f6ef to your computer and use it in GitHub Desktop.
Save gielcobben/64f820de086998d9f6ef to your computer and use it in GitHub Desktop.
Optimise your pngs from the terminal in OSX

JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;

- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;

@Herz3h
Copy link

Herz3h commented Jul 3, 2020

optipng didn't give me good result compared to https://tinypng.com/

@rudolfolah
Copy link

rudolfolah commented Apr 16, 2024

best I got from optipng was a 14% decrease, for a 900kb file it wasn't much, using tinypng it was down by 75% down to 252kb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment