Skip to content

WebP Image Format

What is the WebP image format?

WebP is an image format that supports both lossless and lossy compression. Developed by Google, WebP can reduce image file sizes by up to 34% compared to JPEG and PNG while retaining high quality.


Steps to use WebP in the Flux theme

To allow your site to upload and display WebP images, you need to register the WebP MIME type on the server first. This can be done using one of the two methods below.

Method 1: Configure via web.config

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

Add webp to Allowable File Extensions

Method 2: Configure 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, enter webp in the File name extension field.
  5. Enter image/webp in the MIME type field.
  6. Log in to the site as a super user, 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 to WebP format online via cloudconvert.com.

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


Flux theme's automatic WebP conversion

In addition to manual conversion, the Flux theme also supports automatic conversion to WebP on upload. Enable it by checking Enable convert to webp under Global Settings > Media Library. See Global Settings — Media Library for details.