Created
May 25, 2020 19:40
-
-
Save rojenzaman/daf83e3dbf5784224b007d05516faa59 to your computer and use it in GitHub Desktop.
code to compress your hugo website images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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