feat: content engine usw
This commit is contained in:
14
optimize-images.sh
Normal file
14
optimize-images.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ghost Image Optimizer
|
||||
# Target directory for Ghost content
|
||||
TARGET_DIR="/home/deploy/sites/marisas.world/content/images"
|
||||
|
||||
echo "Starting image optimization for $TARGET_DIR..."
|
||||
|
||||
# Find all original images, excluding the 'size/' directory where Ghost stores thumbnails
|
||||
# Resize images larger than 2500px down to 2500px width
|
||||
# Compress JPEG/PNG to 80% quality
|
||||
find "$TARGET_DIR" -type d -name "size" -prune -o \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) -type f -exec mogrify -resize '2500x>' -quality 80 {} +
|
||||
|
||||
echo "Optimization complete."
|
||||
Reference in New Issue
Block a user