utags commented on issue #2078:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/2078#issuecomment-893622335


   Hi Lofesa,
   
   Thank you for your reply. 
   
   I have added   `image/webp   webp;` to `mime.types` file. 
   
   Then in the HTTP block, I added this one.
   ```
   http{
   
   map $http_accept $webp_suffix {
     default "";
     "~*webp" ".webp";
   }
   
   }
   ```
   
   Then **sites-available** directory each `.conf` file (_inside the server 
block_) I added the following code.
   
   ```
   server {
   location ~* ^.+\.(png|jpe?g)$ {
     add_header Vary Accept;
     try_files $uri$webp_suffix $uri =404;
   }}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pagespeed.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to