I did create helper script which will optimize photos before upload. You can download it from my repo and used it. Well, it is simple bash script which you can run on linux. Of course, if you processing photos then you will probably export with web optimization, but if you make simple changes like crop, rotate ... then it is very helpful.
optimize_for_web.sh
Today's cameras or even smartphones produce large files, thinking in the size in MB. Before you upload a photo to the web it is a good idea to make it smaller and remove the exif metadata. Of course before you will run this script you can crop or make some other adjustment your photos.
Today's cameras or even smartphones produce large files, thinking in the size in MB. Before you upload a photo to the web it is a good idea to make it smaller and remove the exif metadata. Of course before you will run this script you can crop or make some other adjustment your photos.
This script takes all the photos in a given directory, rotates them according to the exif orientation. Then resize them to the desired size in either width or height keeping specific quality. Finally, it removes the exif metadata. Final size in pixel and quality is defined in script by variable
MAX_SIZE=1920
and QUALITY=80
.usage :
optimize_for_web.sh PATH_TO_DIR
requirements : package
imagemagick
and exiv2