I built a tool for that back in March: https://simonwillison.net/2024/Mar/26/llm-cmd/
llm cmd use imagemagick to convert goats.jpg into four different JPEG qualities
I ran that just now and it suggested: convert goats.jpg -quality 10 goats_quality_10.jpg && \
convert goats.jpg -quality 30 goats_quality_30.jpg && \
convert goats.jpg -quality 50 goats_quality_50.jpg && \
convert goats.jpg -quality 90 goats_quality_90.jpg
Which, sure enough, produced me a bunch of different quality images!