diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-01-18 12:52:27 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-01-18 12:52:27 +0100 |
commit | e80f58116a9ecd67b2febe06778c624fd42ed1c6 (patch) | |
tree | 7200fc2c0da09bd7386bc74c2a538ac5bebd37e3 /update_images | |
download | website-e80f58116a9ecd67b2febe06778c624fd42ed1c6.tar.gz |
Restart repo from scratch
Diffstat (limited to 'update_images')
-rwxr-xr-x | update_images | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/update_images b/update_images new file mode 100755 index 0000000..fd8f8fa --- /dev/null +++ b/update_images @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Update pictures, +# recursively remove metadata and decrease file size, +# for each pictures + +IMG_DIR="static/images" +IMG_LIST=$(find ${IMG_DIR}) +IMG_MAX_SIZE="250k" + +for img in ${IMG_LIST[@]}; do + jhead -purejpg "${img}" + jpegoptim --size "${IMG_MAX_SIZE}" "${img}" +done + |