ImageMagick command suddenly stopped working, and webp images not compressing

For the past year or so, I have been using ImageMagick from the command line to batch process png files into webp files - I have been using the commands from here:


Open the folder which you have subfolders containing files with the extensions you want to convert on your terminal.


After that run following command on your terminal:


find . -type f -name "*.png" -exec mogrify -format webp {}  \; -print && find . -type f -name "*.jpg" -exec mogrify -format webp {}  \; -print && find . -type f -name "*.jpeg" -exec mogrify -format webp {}  \; -print


You can also combine all above commands in single expression using regex:


find . -type f -regex ".*\.\(jpg\|jpeg\|png\)" -exec mogrify -format webp {}  \; -print


To remove the leftovers (original files), run following command afterwards:


find . -type f -regex ".*\.\(jpg\|jpeg\|png\)" -exec rm {}  \; -print


I have only been using the second and third commands, with -regex, and then when I tried to use it today, it did nothing (most recently, I used it last week and it worked).


I tried the first command, and it did work, but the webp images are the same size as the png files - it's not compressing them the way that the command was before.


I tested previous png files that I had already converted and compared the webp images and previously I was getting about a 25-35% reduction in size and now I am not getting any from the same source png files.


I have not changed anything in the past few weeks as far as OS updates, adding/deleting anything from the command line, etc. I have ImageMagick 7.1.1 installed on a older MBPro Retina running 10.14.6 Mojave.


I'm not a developer, so I don't know what to do to diagnose anything from the command line, but I'm open to try. I just don't want to make anything worse since it took me some effort to manually install ImageMagick without HomeBrew on my older OS.


Thanks for any suggestions.


MacBook Pro 15″, macOS 10.14

Posted on Feb 1, 2025 2:26 PM

Reply
2 replies
Sort By: 

ImageMagick command suddenly stopped working, and webp images not compressing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.