Plugin requires apache rewrite rules – no CDN like cloudflare.
-
The idea is great but plugin does not work at all. Rewrite rules are added to the .htaccess file and special script appeared in /uploads/atec-webp. But nothing more. No files were converted.
Also, I can’t delete this plugin, because WordPress shows critical error. Only backup from server helped me.
So, be careful, installing it!
UPDATE: The problem with deactivation is fixed in the latest release. So you can fearlessly install this plugin
-
What exactely happend?
What error did you get?
No need to restore from backup in such cases just remove the plugin from the plugin directory.
Please tell more about the error.
How do you know it did not work?
It works in the background, you can only find about if you check image type in browser console.
I am willing to help but need more info.Please send more info so that I can help you with this issue.
It is the nature of the redirect rules, that image file URL will not change but content does. So it might be a .png file but content-type: will be image/webp.
You can find out if you check the response header in the browser console / network tab.Thank you for your kindly help!
As for the problems with the plugin:
1) When I try to deactivate plugin in my WP plugin menu, I have the following notification:
?There has been a critical error on your website. Please check your site administrator’s email for instructions. If you continue to have problems, please visit the support forums?.
No other plugin causes any problem with deactivation.
There are only two methods to deactivate in: either manually through FTP or by complete backup from the server of my hosting provider.
https://imagizer.imageshack.com/img924/6946/J7Yu1H.jpg
I understand that your plugin is new, but I think it would be better to fix this problem.
2) I tried to test the plugin om my website https://www.mangup.su
So I activated it and connected to atecplugins.com, choosing Yes in the plugin menu.
Then I chose WebP Active.
As can I see rewrite rules are added to the .htaccess file and special script appeared in /uploads/atec-webp.
I use Really Simple Security plugin, so I deactivated the rule which prevents code execution in a public folder Uploads.
Then I purged all the cache, including Cloudflare cache.
These are the results:
- I have only jpg image files types loading on the page: https://mangup.su/history/missiya-speczagenta-feodora-1223.html
- Zero files are converted in the plugin window
Here are the screens:
https://imagizer.imageshack.com/img922/1045/C9NO8t.jpg
https://imagizer.imageshack.com/img924/2655/aglhwJ.jpg
I checked through FTP that there are no webP files generated in my uploads folder.
Maybe I’m doing something wrong?
Thank you very much for your extended comment.
Sounds like you know what you are doing.
1)
I have tried uninstall and could reproduce the error. Issue should be fixed with new version.
You can download new version herehttps://atecplugins.com/WP-Plugins/atec-webp.zip
I have not released it yet.
If the uninstall error appears it should be possible to just go back to admin page, as the error is only in the uninstall routine. No need to restore a backup.
2)
You are using cloudflare – so image files are cached and no conversion can happen.
But if you have purged the cache, images should be converted on first request.
So if the rewrite rules are executed, .webp files should be created –?or we have to find out why not.
Posting your .htaccess could help.
However, even if .webp files get created, they will not be pushed through to cloudflare, because the filename in your source remains .jpg.
With your detailed comment I am sure you follow this explaination –?all you did was right.If you install new version and disable CF for a while, we could try to find out what’s happening.
In response header you would seeX-Cache-Image: atec-WebP | Created.
on first request.It’s great that you succeeded in fixing this problem so quickly, thank you. I downloaded the zip-archive and installed it on my website. Now deactivation works properly from the WP Plugin panel.
As for the .webp files generation I checked my wp-content/uploads/ folder through FTP and could not find any. So despite the corresponding rule in the .htaccess file and special script in /uploads/atec-webp for some reason unclear to me they are not created.
So please check the code in my .htaccess file, may be you will find some errors.
#### BEGIN atec-webp
# DO NOT EDIT THIS LINES
<IfModule mod_mime.c>
?????????????? <Files *.webp>
????????????????????????????? Header set Vary 'Accept-Encoding'
????????????????????????????? AddType 'image/webp' .webp
?????????????? </Files>
</IfModule>
<IfModule mod_rewrite.c>
?????????????? RewriteEngine On
?????????????? RewriteCond %{HTTP_ACCEPT} image/webp
?????????????? RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(jpe?g|png|bmp|gif)$ [NC]
????????????????????????????? RewriteCond %{REQUEST_FILENAME}.Xwebp.webp -f
????????????????????????????? RewriteRule ^(.*)$ $1.Xwebp.webp [L,E=no-brotli:1,E=no-gzip:1]
?????????????? RewriteCond %{HTTP_ACCEPT} image/webp
?????????????? RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(jpe?g|png|bmp|gif)$ [NC]
????????????????????????????? RewriteCond %{REQUEST_FILENAME}.webp -f
????????????????????????????? RewriteRule ^(.*)$ $1.webp [L,E=no-brotli:1,E=no-gzip:1]
?????????????? RewriteCond %{HTTP_ACCEPT} image/webp
?????????????? RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(jpe?g|png|bmp|gif)$ [NC]
????????????????????????????? RewriteRule ^(.*)$ wp-content/uploads/atec-webp/img2webp.php [L,E=no-brotli:1,E=no-gzip:1]
</IfModule>
# END atec-webp
# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE
#Begin Really Simple Security
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
#End Really Simple Security
# BEGIN WordPress
# Директивы (строки) междуBEGIN WordPress
иEND WordPress
# созданы автоматически и подлежат изменению только через фильтры WordPress.
# Сделанные вручную изменения между этими маркерами будут перезаписаны.
<IfModule mod_rewrite.c>
?????????????? RewriteEngine On
?????????????? RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
?????????????? RewriteBase /
?????????????? RewriteRule ^index\.php$ - [L]
?????????????? RewriteCond %{REQUEST_FILENAME} !-f
?????????????? RewriteCond %{REQUEST_FILENAME} !-d
?????????????? RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# Заголовки безопасности
Header always set Strict-Transport-Security: "max-age=31536000" env=HTTPS
Header always set Content-Security-Policy "upgrade-insecure-requests"
Header always set X-Content-Type-Options "nosniff"
Header always set X-XSS-Protection "1; mode=block"
Header always set Expect-CT "max-age=7776000, enforce"
Header always set Referrer-Policy: "no-referrer-when-downgrade"
Header always set X-Frame-Options SAMEORIGIN
Header always set Permissions-Policy: "self"
# Конец заголовков безопасности.htaccess looks okay.
But when visiting your site I found that you are not using year/month structure in media folder.I double checked -should work anyway.
but as long as cf is active request will not get through to your server and image status iscf-cache-status HIT
so for files to be created, request must actually get through to your server.
you can flush cf cache or even better turn cf off temporarily and then access an image file to see what happens. open the browser console and check the response header.I have just uploaded new version supporting custom folder structure as you do.
Let me know if you temp. disable cf –?so I can check.After the installation of the latest version of atec WebP some new information in the plugin window appeared, as you can see
https://imagizer.imageshack.com/img922/3773/LLzm28.jpg
But .webp files are not still generated
So I disabled temporary Cloudflare caching through the page rule for the whole website.
Now I can see:
cf-cache-status DYNAMIC
Check it please
DYNAMIC means, that cf now requests images from your server, so as i have just visited your site some .webp files should be created.
The new version now allows non year/month structure when reading the image files.
Unfortunatelly no webp files were created
files total:0
thereof .Xwebp:0
Total size:0 Б
please deactivate, activate the plugin, then activate webp. so it is all green.
check the uploads/atec-webp folder for the img2webp.php, check your .htaccess
if it still doesn’t work, it looks like rewrite is not in effect.
i can send you an img2webp.php file that writes a .log when accessed so we can find out if it is ever called. let me know.Everything is in due place: modified .htaccess and img2webp.php.
You can send me img2webp.php. via mail:
admin(@)mangup.su (delete, please, parentheses)
done.
- You must be logged in to reply to this review.