summaryrefslogtreecommitdiffstats
path: root/update_images
diff options
context:
space:
mode:
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.