How to check if a JPEG is progressive

1 minute read

I’m trying to optimise my JPEGs so that they’re progressive. That way they will appear to load quicker for visitors to my website. This practise seems to be gaining steam recently. In fact, remember in the late 90’s when computers and internet speeds were slower? progressive JPEGs were a sure thing then. With today’s mobile devices still being resource constrained, they again have a chance to shine. In searching for how to integrate the creation of progressive JPEGs into the my Grunt imagemin task I came across an interesting technical discussion of the pros and cons, well worth checking out.

A tricky problem is checking whether a JPEG is progressive in the first place. Luckily ImageMagick really helps with this. If you’re doing any sort of programmatic image manipulation ImageMagick should be in your toolbox already (trust me, it’s very useful). To install ImageMagick on OS X I’m using brew:

$ brew install imagemagick

To identify whether a JPEG is progressive or not do:

$ identify -verbose file.jpg | grep Interlace

If you get back Interlace: JPEG then it’s progressive. It you get back Interlace: None then it’s a baseline (i.e. non-progressive JPEG).

Tags: ,


Leave a Comment