Support » Plugin: W3 Total Cache » Image Service, all images converted, but not replaced

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hfranz

    Thank you for reaching out and I am happy to assist you with this.
    If you find that your original image has been converted to WebP, but other image sizes are missing WebP versions, you may need to double-check that your WordPress environment supports the WebP format.

    While the original image is converted via our API service, the different sizes (e.g. Large, Medium, Thumbnail) are created by your own server. For this, you must have WordPress 5.8 and the appropriate libGD or ImageMagick package available on your server.

    To check if your WordPress environment supports WebP, navigate to Tools > Site Health > Info > Media Handling and double-check that WebP is listed in the supported file formats for the library shown in the Active editor. If you find these are missing the WebP extension, consult your system administrator to set up the correct packages.

    If you are a user of cPanel CentOS 7 server, you can follow these instructions to enable WebP support for ImageMagick.

    I hope this helps!
    Thanks!

    Thread Starter Heinrich Franz

    (@hfranz)

    Hi @vmarko,

    thank you for your reply.

    In the example above the image has original size and a webp version is available. I do not understand why then it is not replaced? Is availability of smaller webp versions a requirement that it works even original size is needed?

    Indeed my imagemagick version has no webp support, whereas GD has. Obviously GD is not used, because webp version for smaller image sizes are missing for all images.
    See also screenshot of Tools > Site Health > Info > Media Handling output here:

    Thank you for your support.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hfranz

    Thank you for the information.
    All images (original sizes)converted with the Image Service tool are sent to a third-party server maintained by the W3 Total Cache team which reduces resource consumption and allows for a large number of conversions in environments where resources can be limited such as shared hosting. Images sent to the W3TC server for conversion are only held temporarily and no permanent information is kept on the server regarding the images.

    WebP optimizations with the Image Service tool do not replace the original image file and all conversions can be reverted without any loss of data.

    So the images are not replaced in the traditional way, as we are using the rewrite rules, and the images are then being served as webp type.
    So if you check the source for the original size image that is converted you can see content-type: webp

    Now since W3 Total Cache does not concert all images, resized and thumbnails, this is where ImageMagic kicks in.

    Please reach out to your hosting provider and let them know that you need webp format supported for ImageMagic.
    I hope this helps and let me know if you have any other questions.

    Thanks!

    Thread Starter Heinrich Franz

    (@hfranz)

    With replacing I mean rewrite, Sorry. I have read your other statements to this new feature and already got a clue how it works.

    However, if I load the site it is served as jpg to me. See here:

    Thanks for clarifying further details. I will contact hosting company for imagemagick.

    On another site (same hosting server) there are all resolution sizes are generated. I am wondering. The single main difference is that there ist plugin https://de.wordpress.org/plugins/regenerate-thumbnails/ installed. Hm…

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hfranz

    Thank you for the information.
    Please check your nginx.conf also and make sure that W3TC webp rewrite rules are at the top of the nginx.conf and check if you have any other rewrite rules besides W3TC.
    Thanks!

    Thread Starter Heinrich Franz

    (@hfranz)

    Hi @vmarko,

    found the solution why the rewrite was not working! 🙂

    The rewrite rules were set correctly to .htaccess. However, there was an option set in Plesk which let nginx decide about which requests directly to serve by them and which are forwarded to Apache. Oddly enough it seems that sometimes it forwarded it to apache, so it was in your case. I my case I never seen that it was working for webp as I wrote previously.

    This is the option which is need to deactivate in Plesk:

    Then every single request is passed to apache and the rewrite is now working for webp.

    Thanks for your support! This feature is great!

    • This reply was modified 12 months ago by Heinrich Franz. Reason: Thank you!
    • This reply was modified 12 months ago by Heinrich Franz. Reason: typo
    Thread Starter Heinrich Franz

    (@hfranz)

    The above mentioned option is called

    Smart static files processing
    If turned off, Apache will process all requests for static files. nginx will only pass requests and responses without modification. Turn off this option only for troubleshooting.

    in English. This is needed to deactivate in Plesk! Under Domain -> Apache & nginx Settings for each site domain.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hfranz

    Thank you for the information and I am glad that the problem is resolved.
    We actually have this as a troubleshooting step in our article.
    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Image Service, all images converted, but not replaced’ is closed to new replies.