This article shows how to convert webp to png jpg gif on Ubuntu with ImageMagick. With the ImageMagick tool, you can convert image formats as desired.
Use ImageMagick® to create, edit, compose, or convert digital images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, WebP, HEIC, SVG, PDF, DPX, EXR, and TIFF. ImageMagick can resize, flip, mirror, rotate, distort, shear, and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses, and Bézier curves.
Install ImageMagick and convert WEBP to PNG JPG GIF on Ubuntu
WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.
— Reference links: https://developers.google.com/speed/webp
To be able to convert webp images to other image formats like jpg, png, gif… You need to install ImageMagick first, in this tutorial itsmeit will show you how to install the latest version of ImageMagick.
Step 1. Install ImageMagick on Ubuntu 22.04, 22.04 LTS
The Ubuntu Apt repository has a stable version of ImageMagick. Sometimes Apt repository takes much time to get the latest version. Let’s first check how to install ImageMagick using the apt method. Now let’s update the system and install ImageMagick.
sudo apt update sudo apt install imagemagick
After the installation is complete, you can check the working version of ImageMagick.
convert -version (or identify -version)
Step 2. Use ImageMagick to convert WEBP to PNG Ubuntu
— How to convert image format single files with ImageMagick
To convert image formats, for example, convert WEBP to PNG Ubuntu, you can use the following command with ImageMagick:
convert filename.webp filename.(format)
eg :
convert filename.webp filename.jpg
— How to convert image format multiple files with ImageMagick
Alternatively, if you have multiple WEBP files and want to batch convert them to JPG, PNG, or vice versa:
find /folder -iname '*.webp' -exec convert '{}' -format webp '{}'.jpg \;
eg:
find /home/itsmeit/Pictures/test -iname '*.webp' -exec convert '{}' -format webp '{}'.jpg \;
Similarly, you can also convert jpg, png… to webp with the above command, just replace the format in the command.
find /folder -iname '*.jpg' -exec convert '{}' -format webp '{}'.png \;
Above is a guide on how to convert webp to png jpg gif on Ubuntu with ImageMagick and vice versa, helping you easily deal with image formats. Hope this article helps you.
– Advertising –
Very good article thank you.