Title: Nginx + Cache Enable doesn&#8217;t allow webp
Last modified: December 4, 2019

---

# Nginx + Cache Enable doesn’t allow webp

 *  [sous.studio](https://wordpress.org/support/users/sousstudio/)
 * (@sousstudio)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/nginx-cache-enable-doesnt-allow-webp/)
 * Hey folks!
 * First of all, thank you for Great plugin!!!
 * Now I have an issue with it. I’ve configured it with nginx and it worked fine.
   Problem was I needed caching, and no cache plugin I’ve tried worked well with
   Webp Express (they just kept giving jpg versions of files). So I’ve read docs
   and installed Cache Enabler. Now that is a powerful combination. Caching goes.
   Files get converted and stuff. But now I have another issue: converted files 
   are not loaded.
 * See, in order for Cache Enabler to work, in Webp Express you must have “Set to.
   webp” instead of “Append .webp”. Now in Nginx config it is like so:
 *     ```
         try_files
           /wp-content/webp-express/webp-images/doc-root/$uri.webp
           $uri.webp
           /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content
           ;
       ```
   
 * As you can see, it tries for files that exist **with** .webp. Since .webp is 
   replaced, and not added, the rule fails, and we don’t get .webp, but .jpeg instead.
 * According to my observation, you could do either of two: set back to “Append .
   webp” which will screw up Cache Enabler, and we’ll lose cache; or two, somehow
   make try_files try $uri with replaced extension. IMHO it can be achieved by scripting,
   but before I go down that “forest”, I’d like to know if anyone dealt with this
   problem in a better way?

The topic ‘Nginx + Cache Enable doesn’t allow webp’ is closed to new replies.

 * ![](https://ps.w.org/webp-express/assets/icon.svg?rev=1918288)
 * [WebP Express](https://wordpress.org/plugins/webp-express/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-express/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-express/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-express/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-express/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-express/reviews/)

## Tags

 * [nginx](https://wordpress.org/support/topic-tag/nginx/)

 * 0 replies
 * 1 participant
 * Last reply from: [sous.studio](https://wordpress.org/support/users/sousstudio/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/nginx-cache-enable-doesnt-allow-webp/)
 * Status: not resolved