Keep all the EXIF/IPTC/etc markers

This commit is contained in:
borekon 2023-01-30 09:19:46 +00:00
parent e39529cd99
commit 79da33911a

View File

@ -193,9 +193,9 @@ if [ "$JPG_OPTIMIZATION" = "y" ]; then
echo -ne ' jpg optimization [..]\r'
cd "$IMG_PATH" || exit 1
if [ -n "$FIND_ARGS" ]; then
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -cmin "$FIND_ARGS" -print0 | xargs -r -0 jpegoptim "$JPG_ARGS" -p -s --all-progressive -m82
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -cmin "$FIND_ARGS" -print0 | xargs -r -0 jpegoptim "$JPG_ARGS" -p --strip-none --all-progressive -m82
else
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -r -0 jpegoptim "$JPG_ARGS" -p -s -m82 --all-progressive
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -r -0 jpegoptim "$JPG_ARGS" -p --strip-none -m82 --all-progressive
fi
echo -ne " jpg optimization [${CGREEN}OK${CEND}]\\r"
@ -213,9 +213,9 @@ if [ "$PNG_OPTIMIZATION" = "y" ]; then
echo -ne ' png optimization [..]\r'
cd "$IMG_PATH" || (rm "/tmp/$lock" && exit 1)
if [ -n "$FIND_ARGS" ]; then
find . -type f -iname '*.png' -cmin "$FIND_ARGS" -print0 | xargs -r -0 optipng "$PNG_ARGS" -o5 -strip all
find . -type f -iname '*.png' -cmin "$FIND_ARGS" -print0 | xargs -r -0 optipng "$PNG_ARGS" -o5 --strip-none
else
find . -type f -iname '*.png' -print0 | xargs -r -0 optipng "$PNG_ARGS" -o5 -strip all
find . -type f -iname '*.png' -print0 | xargs -r -0 optipng "$PNG_ARGS" -o5 --strip-none
fi
echo -ne " png optimization [${CGREEN}OK${CEND}]\\r"
echo -ne '\n'