How do I convert webp files to JPG format?
Asked
Active
Viewed 2.9k times
32
-
I think the question is specific and therefore not too broad: it simply asks: How to convert webp to jpg. However superuser.com would be a better home for it, assuming that it is not a programming question. – therobyouknow Jul 03 '18 at 10:17
-
it is a prefect question - thanks for it! – xhudik Mar 28 '22 at 10:19
-
In WIndows, open the .webp file in MS Paint and save as .jpg. :-) – EleventhDoctor Apr 12 '22 at 19:30
1 Answers
74
Use ImageMagick v7:
magick input.webp output.jpg
Or ImageMagick v6:
convert input.webp output.jpg
If you have lots to do, use mogrify instead. So, say you want to convert all the WEBP images in the current directory to JPEG:
magick mogrify -format JPEG *.webp
And if you want the converted files in a directory called OUTPUT, use:
mkdir OUTPUT
magick mogrify -format JPEG -path OUTPUT *.webp
Mark Setchell
- 169,892
- 24
- 238
- 370
-
4It does require that the webp and jpg delegates be installed with Imagemagick. See https://developers.google.com/speed/webp/download. You can see if it is installed using `convert -version` or `magick -version` as indicted by Mark above – fmw42 Mar 31 '18 at 21:52
-
5In case you have many files: ```for i in *.webp; do name=`echo "$i" | cut -d'.' -f1`; echo "$name"; convert "$i" "${name}.jpg"; done``` – maaniB Mar 06 '21 at 16:31
-
1@maaniB Actually there's a better way with `mogrify`, so I have updated my answer. – Mark Setchell Mar 06 '21 at 16:59
-
1Convert single file: `ffmpeg -i myfile.webp myfile.jpg` Convert all files from the current directory recursively: `find . -iname '*.webp' -exec bash -c 'ffmpeg -y -i "$1" "${1%.*}.jpg"' _ {} \;` – ccpizza Apr 15 '22 at 11:22