Here are some of Imagemagick commands I use often.
Convert to .webp
"Why convert to webp? I thought people use Imagemagick to convert from WebP?"
is a question I would imagine most readers ask. Simply one reason: Storage. Look around, with this memory crisis, I think it's time we choose to safe space.
for i in *.{jpg,jpeg,png}; do
magick convert $i \
-format webp \
-quality 50 \
${i/jpg,jpeg,png/webp}
done