Search This Blog

Tuesday, March 30, 2021

compressing JPG files with ImageMagick using the Google Pagespeed Insights image optimization guidelines

for ImageMagick they recommend the following: Optimize Images  |  PageSpeed Insights  |  Google Developers
convert INPUT.jpg -sampling-factor 4:2:0 -strip [-resize WxH] [-quality N] [-interlace JPEG] [-colorspace Gray/sRGB] OUTPUT.jpg

-sampling-factor 4:2:0
-strip
-quality 85
-interlace JPEG
-colorspace sRGB
Command in ImageMagick:
convert puzzle.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace sRGB puzzle_converted.jpg

No comments:

Post a Comment