Im almost there with this code:
for PHOTO in /home/dvms/Desktop/projs/others/tests/gulp_test/src/images/*.{png,jpeg,jpg}
do
BASE=`basename $PHOTO`
convert "$PHOTO" -quality 50% "/home/dvms/Desktop/projs/others/tests/gulp_test/src/imagesCompressed/$BASE.jpg"
done
But the output files are appearing with their old file extension with a ".jpg" appended in the end, example: imageA.png.jpg .
How can solve this?
Best Answer
Replace the line:
With this one:
Then try again.