How to check if WebP image is displayed on your site

Once you create WebP images and decide to display them on your website, it is important to check if they are properly applied.

Use Picture Tags Method

When using the picture tags method, it is easy to check by looking at your page source code. Use **right click** on your mouse and then **View Page Source** (or similar, depending on browser).

Alternatively, you can use keyboard shortcut for this:

  • CMD + SHIFT + U (Mac)
  • Press CTRL + U (Windows)

If working properly, you should see your <img> elements replaced with <picture> elements, and the URLs will have “.webp” appended to the end.

Use Rewrite Rules Method

Checking for WebP when using this method is a bit trickier because your source code will still show images linked to the original format image (JPG, PNG, or GIF), so you’ll need to check using your browser’s developer tools.

Load your website in your browser, then try any of the following to open your developer tools:

  • Right-click and select **Inspect** (or similar, depending on browser)
  • Press CMD + Option + I (Mac)
  • Press F12 (Windows)

Once your developer tools are open, refresh your page, then click the **Network** tab.

You can then filter requests so only images are displayed by clicking the **Img** tab.

Look for the **Type** column, and it should be WebP if that is the format the image is served in.

Reasons Why WebP Images May Not Be Delivered

NoteNot all images will be delivered as WebP in some cases. This depends on many factors. Make sure these images are not external, and there is WebP version of optimized image in your Media Library.

Use Picture Tag Method

There are a few reasons why WebP will not be displayed using picture tags:

  • background images added via CSS
  • image is missing a WebP version (check by opening the image in browser and append “.webp” to its’ URL)
  • page element HTML is loaded after Imagify looks for the source code to apply WebP markup– images are external

Use Rewrite Rules Method

There are a few main reasons for this to fail using rewrite rules:

  • You are on an NGINX server and didn’t apply custom rules to nginx.conf file manually
  • Image is missing a WebP version (check by opening the image in browser and append “.webp” to its’ URL
  • Apache module mod_rewrite is not active on the server
  • Image is external (hosted on a CDN) so it can’t be rewritten
Was this guide helpful? :) Great! Glat we could help! Thank's for your feedback
Great! Glat we could help!

Your feedback has been sent to our team We value every bit of feedback we receive as it helps us to improve our products and services. Thank you for your time.