UI for Excluding Images from Nginx vhost to Support webp .htaccess redirect rules
When using a WordPress plugin like WebP Express (https://wordpress.org/plugins/webp-express/) or ewww.io, they are using an htaccess rule to redirect browsers that support webp images to the corresponding webp image files. This however does not work out of the box on Cloudways due to Cloudways' Nginx vhost.
Currently, I need to contact Cloudways for each application I want to add support for webp images to exclude images from the Nginx vhost. After that, the htaccess rules work correctly. This is also described by ewww: https://docs.ewww.io/article/16-ewww-io-and-webp-images
Can you please give us control of excluding images from the Nginx vhost ourselves? This would save your support and us much time.
Thank you for considering.
Hello
Users can now exclude images from their application using the one-click Webp Redirection option available on the platform. for more details please refer to our Knowledge base article.
https://support.cloudways.com/en/articles/5799334-how-to-use-and-serve-webp-images-in-wordpress
Regards,
Cloudways Team
-
Polar Bear commented
I recently had a great experience purchasing cosmetics from the website https://www.alyaka.com/collections/mahalo The website is incredibly user-friendly, making it easy to navigate and find exactly what I was looking for. Each product is thoroughly described, providing detailed information that helped me make informed decisions. Not only that, but the prices were very reasonable compared to other sites I've visited. Ordering was a breeze, with a simple checkout process and various payment options available. When my products arrived, I was pleased to find that the quality of the cosmetics exceeded my expectations. Overall, I highly recommend shopping on Alyaka for anyone looking for high-quality cosmetics with up-to-date information and excellent customer service.
-
Huxley Morris commented
Revamping my Nginx vhost for optimal performance led me down the rabbit hole of web development intricacies. Crafting UI to exclude images seamlessly, I found a gem in the form of .htaccess redirect rules. It's like refining a masterpiece—every element matters. Integrating a video background remover from https://depositphotos.com/video-background-remover.html ensures a dynamic touch without compromising the essence of my web design.
-
Marvin Audette commented
I am not very tech-savvy, but I needed some American flag SVG files for a project I was working on. I found MasterBundles and was impressed by the user-friendly website and the easy-to-follow instructions for downloading the files. The files themselves were of great quality, and I was able to use them in my project without any problems. I would definitely recommend https://masterbundles.com/best-american-flag-svg-files/ MasterBundles to anyone in need of SVG files.
-
Anonymous
commented
This is absolutely important as it makes such a big difference in performance. I can have the fastest server, but if the images are large it won't help that much. I agree, it must be able for a website admin to change the settings without custom configurations via Cloudways support.
A switch on server and application level is highly appreciated.
-
Timor Klemberg
commented
Every installation I install webp converter, I need the support to work for 10 - 15 munutes to configure in to work.
A huge loss of time both sides.
Please add the configuration to the menu or configure it permanently ahead.
Thanks. -
Sjors
commented
would like to add directives to redirect .jpg files to .jpg.webp when webp is supported.
.htaccess rules like this can improve site speed, but are never reached cause of nginx. Would be awsome to be able to do this in a config per app.
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.jpg.webp -f
RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} ^([^@]*)@@https?://\1/.*
RewriteRule (.+)\.jpg$ /$1.jpg.webp [NC,T=image/webp,E=cache-control:no-cache,L] -
eric.thomson
commented
How do you get to these files from the Cloudways dashboard? Is it on the App or Server side? Thanks
-
David Thomas
commented
at the moment .webp images are being served by apache.
they should be served by nginx and cached just like jpg/png.Also if the .webp file exists next to the jpg/png serve it to browsers that support webp instead.
```
# http config block
map $http_accept $webp_ext {
default "";
"~*webp" ".webp";
}# server config block
location ~* ^(/path/to/your/images/.+)\.(png|jpg)$ {
set $img_path $1;
add_header Vary Accept;
try_files $img_path$webp_ext $uri =404;
}
``` -
Peeyoosh Kumar
commented
I checked and found npm is already there on the server. so its just a package addon https://www.npmjs.com/package/cwebp
-
Peeyoosh Kumar
commented
Hello:
most of the platforms like wordpress and others are capable of using webp and other image compressions. Although i do not see webp as an option as of now on cloudways. We do have pngquant and jpgmini or something but webp is the best in optimising image size and reducing page loads for all.
The necessary libraries could be added as a package and administrators can use ssh access on there server to convert files in batch or individual based on choice.
Thanks