Skip to content

How to Use the WebP Image Format ​

What is the WebP image format? ​

WebP is an image format that supports both lossless and lossy compression. Developed by Google, it can reduce image file sizes by up to 34% compared with JPEG and PNG while retaining high quality — a straightforward way to speed up your pages.


Steps to use WebP in the Glend theme ​

Before your site can upload and display WebP images, the WebP MIME type must be registered on the server. Use one of the two methods below.

Method 1: via web.config ​

  1. Connect to the site's root directory with FTP software.
  2. Back up the web.config file.
  3. Edit web.config and add the following lines inside <staticContent></staticContent>:
xml
<remove fileExtension=".webp" />
<mimeMap fileExtension=".webp" mimeType="image/webp" />
  1. Refresh the site. If it reports an error, restore web.config from the backup made in step 2.
  2. Log in as a superuser, go to Settings > Security, and add webp to Allowable File Extensions.

Add webp to Allowable File Extensions

Method 2: via IIS Manager ​

  1. Open IIS Manager and navigate to the site you want to manage.
  2. In Features View, double-click MIME Types.
  3. In the Actions pane, click Add.
  4. In the Add MIME Type dialog, type webp in File name extension.
  5. Type image/webp in the MIME type box.
  6. Log in as a superuser, go to Settings > Security, and add webp to Allowable File Extensions.

Add webp to Allowable File Extensions


Convert JPG/PNG to WebP ​

You can convert JPG/PNG images online via cloudconvert.com.

Once the configuration above is done, upload and use WebP images in the theme just like any other image format.