Convert JPG Images to Optimized WebP
mogrify -format webp -quality 80 -strip -resize "1024x>" *.jpg
This command creates optimized WebP versions of your JPG images while intelligently handling image sizes, only larger images are resized, and smaller ones are left unchanged. The original JPG files remain untouched, with new WebP versions created alongside them.