Image WebP Conversion and NGINX
With NGINX we can do our rewrites in the http.conf file.
Some plugins are free but they demand active API to convert all images inside a media folder.
Can be managed without a plugin in the case of NGINX and cPanel?
-
Hey there! I don't have an API available on my end for this type of work, but any of the standard tools should work well on a cPanel machine.
0 -
Update! One of our developers noticed this thread and decided it would be a good idea to include this int he product. We've created case CPANEL-45722 to add .webp files as a conversion option in cPanel >> Images.
0 -
As it is also important to convert specific folders. Some images should not be converted (logos etc.).
An example:
The
/themes
directory is mapped to/wp-content/themes/
; this directory works similarly toWP_CONTENT_DIR . '/themes/'
in a self-hosted WordPress installation.Media Library Folders in the WordPress dashboard. You’ll now see all the folders inside your WordPress upload directory or unique assets folder. URL needs an option as the WebP files won’t be listed in your Media Library. Use rewrite rules option for WebP display on your site. Both of these options will provide fallback support, so if a visitor is using a browser that doesn’t support WebP images, the optimized JPG or PNG versions will be served instead.
Source: https://imagify.io/documentation/enable-webp-images-works/
0 -
How to set NGINX modules to work Nginx configuration for the specific rewrite rules in place.
0
Please sign in to leave a comment.
Comments
4 comments