• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue How can I use Webp in Plesk

Uraniumhazee

New Pleskian
OS
CentOS Linux 8.4.2105
Product
Plesk Obsidian
Version 18.0.38 Update #2, last updated on Sept 15, 2021 03:26 AM

I want to use Webp in my site.
I found this site

Code:
In shortpixel method;

First, add this block before the server directive:

map $http_accept $webp_suffix {
    default "";
    "~*webp" ".webp";
}
Add this block inside the server directive:

location ~* ^(/wp-content/.+)\.(png|jpe?g)$ {
    set $base $1;
    set $webp_uri $base$webp_suffix;
    set $webp_old_uri $base.$2$webp_suffix;
    set $root "<<FULL PATH OF wp-content PARENT>>";
    root $root;
    add_header Vary Accept;
    if ( !-f $root$webp_uri ) {
        add_header X_WebP_SP_Miss $root$webp_uri;
    }
    try_files $webp_uri $webp_old_uri $uri =404;


How can i do this in plesk?
1) In plesk there is a section called. How can i add these codes?

Additional nginx directive​


2) I used filezilla to see the folders!

In /etc/nginx folder
Nginx.conf has these codes.

Code:
#user  nginx;
worker_processes  1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include /etc/nginx/modules.conf.d/*.conf;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    #tcp_nodelay        on;

    #gzip  on;
    #gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;

/var/www/vhosts/system/wifisifrekirici.com/conf
Nginx.conf has these codes.



How and where should i add
In shortpixel codes? Thanks
 
Plesk already support WebP images format: WebP support in PHP packages provided by Plesk
I'm not sure that you have to add something additional in configs to support it.
Si tacuisses ...

Generating webp is only one part, there also has to be configuration of the webserver to deliver webp instead of jpg/png if a webp with the same basename exists and the browser supports webp (that's the $http_accept part of the config).
 
Back
Top