Convert WebP to JPEG in Ubuntu

With WebP file format, we get to have lossy as well as lossless compressed images. The file format was developed by Google. Whereas, JPEG (Joint Photographic Experts Group) is one of most widely used lossy compression image file format. The WebP file format is preferred by web developers as the size is relatively smaller and that helps web developers deliver content faster. In this article, we cover how to convert WebP to JPEG in Ubuntu.

The command-line tool which we utilize is convert. The utility is a part of ImageMagick package. So, we first cover installation steps for Imagemagick package.

Note: Following operations may require superuser privileges. In case you don’t have one then we advise you to contact your System Administrator for assistance.

Install ImageMagick in Ubuntu

The package ImageMagick is available through standard Ubuntu repository. So, open a terminal and update the repository first –

sudo apt update

Thereafter, to install ImageMagick –

sudo apt install imagemagick

Convert WebP to JPEG in Ubuntu

After the installation process is complete. We get the convert command-line utility through the package. To convert WebP to JPEG in Ubuntu, use the following syntax –

convert <input.webp> <output.jpeg>

For instance, if we have a test.webp image file and we want it to convert as – converted.jpeg. Then, the above syntax can be utilized as follows –

convert test.webp converted.jpeg

In conclusion, we have covered WebP file format to JPEG in Ubuntu here.

Additional Info –

To verify if the converted file is an actual JPEG image file or not. We have file command-line utility. The main function of the file command-line utility is to determine the file type. Following syntax we can use to check file type –

file <input_file>

For instance, we had converted.jpeg from the above example. To check its file type, issue the following in terminal –

file converted.jpeg

It would return with, among others, JPEG Image data.

It is worth mentioning here that, file command-line utility can be used on other files as well. Its just not restricted to JPEG file formats.

Similar Posts