Skip to content

Instantly share code, notes, and snippets.

@lavoiesl
Last active February 19, 2016 16:47
Show Gist options
  • Select an option

  • Save lavoiesl/11024067 to your computer and use it in GitHub Desktop.

Select an option

Save lavoiesl/11024067 to your computer and use it in GitHub Desktop.
optimize images
#!/bin/bash
#
# @link https://gist.github.com/lavoiesl/11024067
find . -type f \( -name '*.jpg' -or -name '*.jpeg' \) -exec jpegoptim --strip-all "{}" \;
find . -type f -name '*.png' -exec optipng -o8 -strip all '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment