How to configure nginx to serve .webp images instead of .jpg/.png for a domain on nginx only in Plesk

Follow

Comments

1 comment

  • Avatar
    Elvis Plesky

    The following part must be used for testing purposes only:
    ==========================
    if ( !-f $document_root$uri$webp_extension ) {
    add_header X_WebP_SP_Miss $document_root$uri$webp_extension;
    }
    ==========================
    It provides full path to the requested image, e.g.,
    X_WebP_SP_Miss: /var/www/vhosts/example.org/httpdocs/img/image.png.webp
    which is not safe on production environment. Must be commented out as soon as all images have webp version.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request