And if the WebP files are being created, in what directory are they located?
Hi,
I have checked your site and it does not like the WebP images are created (they would be in the Uploads directory of your site)
WebP images are only generated on newly added images, are the images newly added?
Hi @vupdraft, the images are not newly added. I did not realize that only new images are converted. If I can find a 3rd party app to convert the existing ones, and then put them in the uploads directory, will that work?
It might, what kind of server are you using?
Here is the InMotion server info:
Server Name ecbiz331
cPanel Version 102.0 (build 31)
Apache Version 2.4.55
PHP Version 8.1.14
MySQL Version 10.3.38-MariaDB-log
Architecture x86_64
Operating System linux
Dedicated IP Address 23.235.196.174
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.16.3
Kernel Version 3.10.0-962.3.2.lve1.5.73.el7.x86_64
Once you have created the WebP images using a different plugin, can you also add the following to your .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# Check if browser supports WebP images
RewriteCond %{HTTP_ACCEPT} image/webp
# Check if WebP replacement image exists
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
# Serve WebP image instead
RewriteRule (.+)\.(jpe?g|png|gif)$ $1.webp [T=image/webp,E=REQUEST_image]
</IfModule>
<IfModule mod_headers.c>
# Vary: Accept for all the requests to jpeg, png and gif
Header append Vary Accept env=REQUEST_image
</IfModule>
<IfModule mod_mime.c>
AddType image/webp .webp
</IfModule>
-
This reply was modified 2 years, 11 months ago by
vupdraft.
I tried the above, but unfortunately it did not work.
Then I uploaded a new image to see if WP-Optimize would automatically create the WebP images for me. The JPG file and thumbnail files were created in /public_html/main/wp-content/uploads/2023/04. However, there are no WebP images in that directory. Are the WebP images created elsewhere?
@vupdraft I’ve tried this code, but it didn’t work, I have some images converted to webp by your plugin, but they don’t display π Any ideas?
I’ve checked Create WebP version of image and then add image to post with classic editor or add image to widget with new editor, the image will always be the original extension as I uploaded. The webp file created but not in use and seems to never use until manually change file extension in the contents.