WebP image conversion problem

Discussion in 'Installation/Configuration' started by mymmo73, Jan 28, 2021.

  1. mymmo73

    mymmo73 Member

    hello everyone i have ispconfig 3.2.2 with apache2, i installed a plugin on one of my wordpress sites to convert images to webP format, the plugin gives me this message "The rules have been applied, however, the images have still not been converted to WebP. We recommend to contact your server provider to know more about the cause of this issue." how do i enable this feature?
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    No idea, and no indications from their message. It's strange they would refer you to your server provider, but maybe there's some info in a log that you should be looking for?
     
  3. mymmo73

    mymmo73 Member

    I don't think the message seems clear, also I have tried more than one plugin for converting images to WebP, actually none have succeeded in the conversion, so I guess it is a problem with my system ..
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Maybe you need some additional software or php module installed? Likely some of the plugins you have tried will list their server requirements, which you can check.
     
  5. mymmo73

    mymmo73 Member

    I connected to the support of the last plugin I installed, some users complain about the same thing, they also say that on some hosting the plugin works correctly and in others it doesn't, however the plugin itself does not give other indications besides what I have indicated in post # 1, you say that maybe a script or a php module would be needed, but with my skills I don't know where to put my hands, consider that I installed my server following tutorials so I let you imagine my level of programmer :D
     
  6. nhybgtvfr

    nhybgtvfr Active Member

    does it convert the images on upload? when someone tries viewing one? or do you have to tell it to convert an image?

    try triggering whatever is required to get it to start a conversion and then look in the websites error log file, if there's some php version / syntax change incompatibility or missing php module, there should be something in the error log about it.
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    It falls squarely in the plugin developers to know what is required on the server, or to add any debug messages or a list of requirements to help troubleshoot your environment. I know many plugins are pieced together by folks in their free time and they can't offer much support, but maybe you could find a commercial one that does what you need and the developers have more incentive/obligation to help?
     
  8. mymmo73

    mymmo73 Member

    In fact I solved it so, I contacted support with their instructions I solved it by modifying the vhost file of my site by pasting the code provided by them, the file is in the directory /etc/apache2/sites-available/example.com.conf
     
  9. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    If that is a site created in ispconfig, your changes will be overwritten in the future; usually you can put them in the site's apache directives so they are not lost.

    For those curious, and others who might find this thread, do you mind sharing the needed changes?
     
  10. mymmo73

    mymmo73 Member

    ok, as I wrote in the previous post I went to the directory below and I pasted the code # BEGIN SMUSH-WEBP that the plugin developers gave me just before the line <Directory /var/www/maysite.it/web>
    Code:
    [email protected]:/etc/apache2/sites-available# less maysite.it.vhost
                  
    # BEGIN SMUSH-WEBP
    <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteCond %{DOCUMENT_ROOT}/wp-content/smush-webp/disable_smush_webp !-f
     RewriteCond %{HTTP_ACCEPT} image/webp
     RewriteCond %{REQUEST_FILENAME} -f
     RewriteCond %{DOCUMENT_ROOT}/wp-content/smush-webp/$1.$2.webp -f
     RewriteRule ^/?(.+)\.(jpe?g|png)$ /wp-content/smush-webp/$1.$2.webp [NC,T=image/webp,E=WEBP_image]
    </IfModule>
    
    <IfModule mod_headers.c>
     Header append Vary Accept env=WEBP_image
    </IfModule>
    
    <IfModule mod_mime.c>
     AddType image/webp .webp
    </IfModule>
    # END SMUSH-WEBP
                    <Directory /var/www/maysite.it/web>
                                    # Clear PHP settings of this website
                                    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
                                                    SetHandler None
                                    </FilesMatch>
                                    Options +SymlinksIfOwnerMatch
                                    AllowOverride All
                                                                    Require all granted
    
                                    # ssi enabled
                                    AddType text/html .shtml
                                    AddOutputFilter INCLUDES .shtml
                                    Options +Includes
                    </Directory>
     
    Jesse Norell likes this.
  11. mymmo73

    mymmo73 Member

    sorry how this thing is done
     
  12. nhybgtvfr

    nhybgtvfr Active Member

    you shouldn't need to add those to your vhost config.
    the plugin should have automatically added those to the .htaccess file in the root of your wordspress site.

    it probably failed to do that because it didn't have permissions to write to that file, if you've made the .htaccess file owner read-only on all your wordpress sites, your going to have more problems... especially if you use plugins like wordfence, wp-total-cache etc which will expect to be able to add lots of rules into that file.
     
  13. mymmo73

    mymmo73 Member

    I had done it manually but it didn't work
     

Share This Page