Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
Created May 25, 2020 19:40
Show Gist options
  • Save rojenzaman/daf83e3dbf5784224b007d05516faa59 to your computer and use it in GitHub Desktop.
Save rojenzaman/daf83e3dbf5784224b007d05516faa59 to your computer and use it in GitHub Desktop.
code to compress your hugo website images
#!/bin/bash
#add code to hugo project dir.
find static/images/uploads/ \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \) -print0 | xargs -0 -P8 -n2 mogrify -strip -thumbnail '1000>' -format jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment