3 ms·
I've been using this great imagemagick script for optimizing images the past few years. Works like a charm. Any images that are going to be served from my websi
by mcjiggerlog 8y ago
I've been using this great imagemagick script for optimizing images the past few years. Works like a charm. Any images that are going to be served from my websites first get optimized via the script.
smartresize() {
mogrify -path $3 -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB $1
}
Usage:
smartresize image.png 300 outdir/
Looks like I must have found it here https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ https://www.smashingmagazine.com/2015/06/efficient-image-res...
- mabynogy 8y agoThanks. I noticed a gain of 20% on my images with this method.