Using ImageMagick to create webp images, saving you a surprising amount of resources

I was checking on PageSpeed Insights, the website performance tool by Google. And I was happy to see a score of 100. Which is not hard for me to achieve with the techniques I use, but I enjoy seeing it nonetheless. Who doesn't like an A+?

The only further suggestion for improvement from the tool was to convert my images into webp. So here is how I did it.

It's very simple with 'convert'

Once you have ImageMagick installed on your machine, all you have to do is run this command to see the hugely reduced filesize.

convert original-filename.jpg converted-filename.webp

Is webp worth it? 

I started to read further into it and yes, the file sizes are much, much lower. I was very surprised by the performance. In my test I turned a 123.5 KB jpg into a 16.9 KB webp image. With no visible difference in picture quality. Crraaaazzzy!

Since images are, for most websites, the biggest files the browser has to download. If you can make them smaller in file size, then you can make your website faster, and your visitors happier.

If you want to read more about webp, check out the Google Developers guide.

by Justin Chaschowy
Cheetah chief. Lives in Africa and makes you money by improving your site. To serve your customers better, and lower hosting costs (usually to $0). He enjoys boxing, Linux OS, and finding good films to watch with his wife.