Support » Plugin: Imagify – Optimize your Images & Convert WebP » How can I be sure the WebP format is being used?

  • Resolved rogeriodec


    I enabled Imagify, enabled the “Use rewrite rules” option and my .htaccess was properly changed.
    Even so, as nothing changes within the HTML code, how can I be sure that the WebP format is being used in place of the original extensions?
    Is there a way to test this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Oke. I am similar to you. and waiting for the support team, but I can give you 3 ways to fix it ….
    Method 1: Select the <picture> method then, Optimize again and check if the extension .webp exists (, then F5 and thank me.
    Method2 : .htacess
    Step 1: Open .htacess and add code
    # BEGIN Imagify: webp file type
    <IfModule mod_mime.c>
    AddType image/webp .webp
    # END Imagify: webp file type

    Or ngix

    location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
    add_header Vary Accept;

    if ($http_accept ~* “webp”){
    set $imwebp A;
    if (-f $request_filename.webp) {
    set $imwebp “${imwebp}B”;
    if ($imwebp = AB) {
    rewrite ^(.*) $1.webp;

    Thread Starter rogeriodec


    Nevermind, to be sure that WebP format is working, I did a simple test: once Imagify always keeps the original image PLUS and WebP version of the image, just rename the original image and then the WebP image using an FTP client (WinSCP, FileZilla, etc) to FORCE A BROKEN LINK.
    For example, suppose your site currently shows (in any part) an image named “test.png“.
    If Imagify is correctly configured (Admin -> Settings -> Imagify -> Optimization -> Create webp versions of images -> Display images in webp format on the site), the FTP folder would have 2 images:

    • test.png
    • test.png.webp


    1. Using your FTP client, manually rename test.png to some inexisting name, for example, test.pngx and force a refresh for your current page (Ctrl+F5, to force reload images not using the current browser cache) . You’ll see that your current image is still being shown, ie, the webp version is being used
    2. Now, rename the WebP version to any name to force a broken link and Ctrl+F5 in your browser, as in the previous. Now you’ll see that the image is not appearing anymore, once there is not the original PNG nor the WebP versions
    3. Now, restore just the png image to its original name (rename “test.pngx” to “test.png”) and refresh. You’ll see now that the image reappears, ie, if a WebP version of an image is not found, the original image is used.
    4. Finally, restore the Webp version (rename “test.png.webpx” to “test.png.webp”) and refresh. In this case, the WebP version will be used.
    • This reply was modified 1 year, 4 months ago by rogeriodec.
    • This reply was modified 1 year, 4 months ago by rogeriodec.

    Alternatively, and if you used the “picture tag” option, you can simply view your page source and search for “<picture” and you should see the images that use the WebP format.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I be sure the WebP format is being used?’ is closed to new replies.