You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i would love to use lot Modern Image Formats and by default to generate webp and avif file on upload ( and maybe on bulk conversion but annother issue)
i think we could use a nginx config like this
exemple on upload i have Manif_XXL.jpg
and it become Manif_XXL-jpg.avif
but i think its harder because of this format so it could be awsome to provide some nginx conf that do the avif/webp rewite
exemple from compresx extention
# BEGIN CompressXset$ext_avif".avif";
if ($http_accept!~*"image/avif") {
set$ext_avif"";
}
set$ext_webp".webp";
if ($http_accept!~*"image/webp") {
set$ext_webp"";
}
location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif|webp)$ {
add_header Vary Accept;
add_header Cache-Control "private";
expires365d;
try_files
/wp-content/compressx-nextgen/$path.$ext$ext_avif
/wp-content/compressx-nextgen/$path.$ext$ext_webp
/wp-content/$path.$ext$uri = 404;
}
# END CompressX
Hello! I'm not sure I understand. The plugin does already generate WebP or AVIF upon upload, and then it rewrites the image URLs to point to the modern image format when the page is rendered.
Feature Description
Thanks for making wordpress bether
i would love to use lot Modern Image Formats and by default to generate webp and avif file on upload ( and maybe on bulk conversion but annother issue)
i think we could use a nginx config like this
exemple on upload i have
Manif_XXL.jpg
and it become
Manif_XXL-jpg.avif
but i think its harder because of this format so it could be awsome to provide some nginx conf that do the avif/webp rewite
exemple from compresx extention
maybe we could do something like this
there is multiples plugins that use some close fonctionnality
some documentation
https://github.com/ksanksana/Otus/blob/main/10_Optimization/conf_optimized/wordpress
https://vincent.bernat.ch/en/blog/2021-webp-avif-nginx
https://www.lazutkin.com/blog/2014/02/23/serve-files-with-nginx-conditionally/
https://compressx.io/docs/config-nginx-htaccess-rules/
The text was updated successfully, but these errors were encountered: