1. Batch optimize multiple JPG images
jpegoptim --strip-all /dir/*.jpg
-
jpegoptim
- tool to optimize JPG images (apt install jpegoptim), -
--strip-all
- removes all meta data from file, -
/dir/*.jpg
- list of images to optimize (files will be overwritten).
Open original or edit on Github.
2. Optimize JPG image
jpegoptim --strip-all img.jpg
-
jpegoptim
- tool to optimize JPG images (apt install jpegoptim), -
--strip-all
- removes all meta data from file, -
img.jpg
- input image to be optimized (will be overwritten).
Open original or edit on Github.
3. Optimize JPG image to fit to certain file size
jpegoptim --strip-all -S 100k img.jpg
-
jpegoptim
- tool to optimize JPG images (apt install jpegoptim), -
--strip-all
- removes all meta data from file, -
-S 100k
- try to optimize so that final file size is less than 100k, -
img.jpg
- input image to be optimized (will be overwritten).
Top comments (0)