ireland-trip-site/pictures/optimize.sh
Chandler Swift 967d49cfbc
Add optimized pictures
Included is a script with the optimization commands I ran. Values are
pretty arbitrary; I didn't do much testing after validating that
everything looked good enough.

Fixes #1
Fixes #3
2024-12-22 21:43:49 -06:00

14 lines
420 B
Bash
Executable file

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p imagemagick
for picture in original/*png; do
magick $picture -resize 800x800 -quality 80 $(basename $picture .png)-sm.jpg
magick $picture -quality 90 $(basename $picture .png).jpg
done
for picture in original/*jpg; do
magick $picture -resize 800x800 -quality 80 $(basename $picture .jpg)-sm.jpg
cp $picture $(basename $picture)
done