summaryrefslogtreecommitdiffstats
path: root/update_images
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-01-18 12:52:27 +0100
committerRomain Gonçalves <me@rgoncalves.se>2021-01-18 12:52:27 +0100
commite80f58116a9ecd67b2febe06778c624fd42ed1c6 (patch)
tree7200fc2c0da09bd7386bc74c2a538ac5bebd37e3 /update_images
downloadold-website-e80f58116a9ecd67b2febe06778c624fd42ed1c6.tar.gz
Restart repo from scratch
Diffstat (limited to 'update_images')
-rwxr-xr-xupdate_images15
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
+
remember that computers suck.