blob: fd8f8fa791666194e45afcf924df5854a93d322a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|