Version Description
- Fixed javascript bug
Download this release
Release Info
Developer | rosell.dk |
Plugin | WebP Express |
Version | 0.8.1 |
Comparing to | |
See all releases |
Code changes from version 0.8.0 to 0.8.1
- README.md +5 -4
- README.txt +45 -8
- changelog.txt +5 -0
- lib/options/js/converters.js +3 -4
- webp-express.php +1 -1
README.md
CHANGED
@@ -115,14 +115,15 @@ I am btw considering making an option to have the plugin redirect to the webp in
|
|
115 |
### I am on NGINX / OpenResty
|
116 |
It is possible to make WebP Express work on NGINX, but it requieres manually inserting redirection rules in the NGINX configuration file (nginx.conf). For standard wordpress installations, the following rules should work:
|
117 |
|
|
|
|
|
118 |
```
|
119 |
-
if ($http_accept ~*
|
120 |
-
rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?
|
121 |
}
|
122 |
```
|
123 |
-
However, the location of the wp-content folder and the plugins folder can be customized with Wordpress. In that case, the above rule must be changed accordingly.
|
124 |
|
125 |
-
|
126 |
|
127 |
Discussion on this topic here: https://wordpress.org/support/topic/nginx-rewrite-rules-4/
|
128 |
|
115 |
### I am on NGINX / OpenResty
|
116 |
It is possible to make WebP Express work on NGINX, but it requieres manually inserting redirection rules in the NGINX configuration file (nginx.conf). For standard wordpress installations, the following rules should work:
|
117 |
|
118 |
+
*Note that the rules stated here previously had a bug*: It had ” rather than ". The slightly slanted quotation mark does not work. Also, it used $request_uri, which contains the querystring, which resulted in errors when querystrings were supplied (ie ?debug)
|
119 |
+
|
120 |
```
|
121 |
+
if ($http_accept ~* "webp"){
|
122 |
+
rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content break;
|
123 |
}
|
124 |
```
|
|
|
125 |
|
126 |
+
The `wp-content` argument must point to the wp-content folder (relative to document root). In most installations, it is 'wp-content'.
|
127 |
|
128 |
Discussion on this topic here: https://wordpress.org/support/topic/nginx-rewrite-rules-4/
|
129 |
|
README.txt
CHANGED
@@ -126,22 +126,39 @@ I am btw considering making an option to have the plugin redirect to the webp in
|
|
126 |
= I am on NGINX / OpenResty =
|
127 |
It is possible to make WebP Express work on NGINX, but it requieres manually inserting redirection rules in the NGINX configuration file (nginx.conf). For standard wordpress installations, the following rules should work:
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
-
|
134 |
-
|
|
|
135 |
|
136 |
-
|
|
|
|
|
137 |
|
138 |
-
Discussion on this topic here: https://wordpress.org/support/topic/nginx-rewrite-rules-4/
|
139 |
|
140 |
= I am on a WAMP stack =
|
141 |
It has been reported that WebP Express *almost* works on WAMP stack. I'd love to debug this, but do not own a Windows server or access to one... Can you help?
|
142 |
|
143 |
= Why do I not see the option to set WebP quality to auto? =
|
144 |
-
The option will only display, if your system is able to detect jpeg qualities. To make your server capable to do that, install *Imagick* or *Gmagick
|
|
|
|
|
|
|
|
|
145 |
|
146 |
= How do I make this work with a CDN? =
|
147 |
Chances are that the default setting of your CDN is not to forward any headers to your origin server. But the plugin needs the "Accept" header, because this is where the information is whether the browser accepts webp images or not. You will therefore have to make sure to configure your CDN to forward the "Accept" header.
|
@@ -150,6 +167,23 @@ The plugin takes care of setting the "Vary" HTTP header to "Accept" when routing
|
|
150 |
https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values#Values_for_an_image
|
151 |
- so it is not an issue.
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
= How do I buy you a cup of coffee? =
|
154 |
Easy enough! - [Go here!](https://ko-fi.com/rosell)
|
155 |
|
@@ -159,6 +193,9 @@ Easy enough! - [Go here!](https://ko-fi.com/rosell)
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
162 |
= 0.8.0 =
|
163 |
* New conversion method, which calls imagick binary directly. This will make WebP express work out of the box on more systems
|
164 |
* Made sure not to trigger LFI warning i Wordfence (to activate, click the force .htaccess button)
|
126 |
= I am on NGINX / OpenResty =
|
127 |
It is possible to make WebP Express work on NGINX, but it requieres manually inserting redirection rules in the NGINX configuration file (nginx.conf). For standard wordpress installations, the following rules should work:
|
128 |
|
129 |
+
*Note that the rules stated here previously had a bug*: It had ” rather than ". The slightly slanted quotation mark does not work. Also, it used $request_uri, which contains the querystring, which resulted in errors when querystrings were supplied (ie ?debug)
|
130 |
+
|
131 |
+
For 0.8.0:
|
132 |
+
`
|
133 |
+
if ($http_accept ~* "webp"){
|
134 |
+
rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content break;
|
135 |
+
}
|
136 |
+
`
|
137 |
+
*Beware:* If you copy the code above, you might get an html-encoded ampersand before "wp-content"
|
138 |
+
|
139 |
+
For 0.7.0:
|
140 |
+
`
|
141 |
+
if ($http_accept ~* "webp"){
|
142 |
+
rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?source=$request_filename&wp-content=wp-content break;
|
143 |
}
|
144 |
+
`
|
145 |
+
*Beware:* If you copy the code above, you might get an html-encoded ampersand before "wp-content"
|
146 |
+
|
147 |
|
148 |
+
The `wp-content` argument must point to the wp-content folder (relative to document root). In most installations, it is 'wp-content'.
|
149 |
+
|
150 |
+
Discussion on this topic [here](https://wordpress.org/support/topic/nginx-rewrite-rules-4/)
|
151 |
|
|
|
152 |
|
153 |
= I am on a WAMP stack =
|
154 |
It has been reported that WebP Express *almost* works on WAMP stack. I'd love to debug this, but do not own a Windows server or access to one... Can you help?
|
155 |
|
156 |
= Why do I not see the option to set WebP quality to auto? =
|
157 |
+
The option will only display, if your system is able to detect jpeg qualities. To make your server capable to do that, install *Imagick extension* (PECL >= 2.2.2) or enable exec() calls and install either *Imagick* or *Gmagick*.
|
158 |
+
|
159 |
+
If you have the *Imagick*, the *Imagick binary* or the *Remote WebP Express* conversion method working, but don't have the global "auto" option, you will have the auto option available in options of the individual converter.
|
160 |
+
|
161 |
+
Note: If you experience that the general auto option doesn't show, even though the above-mentioned requirements should be in order, check out [this support-thread](https://wordpress.org/support/topic/still-no-auto-option/).
|
162 |
|
163 |
= How do I make this work with a CDN? =
|
164 |
Chances are that the default setting of your CDN is not to forward any headers to your origin server. But the plugin needs the "Accept" header, because this is where the information is whether the browser accepts webp images or not. You will therefore have to make sure to configure your CDN to forward the "Accept" header.
|
167 |
https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values#Values_for_an_image
|
168 |
- so it is not an issue.
|
169 |
|
170 |
+
= Does it work with lazy loaded images? =
|
171 |
+
No plugins/frameworks has yet been discovered, which does not work with *WebP Express*.
|
172 |
+
|
173 |
+
The most common way of lazy-loading is by setting a *data-src* attribute on the image and let javascript use that value for setten the *src* attribute. That method works, as the image request, seen from the server side, is indistinguishable from any other image request. It could however be that some obscure lazy load implementation would load the image with an XHR request. In that case, the *Accept* header will not contain 'image/webp', but '*/*', and a jpeg will be served, even though the browser supports webp.
|
174 |
+
|
175 |
+
The following lazy load plugins/frameworks has been tested and works with *WebP Express*:
|
176 |
+
- [BJ Lazy Load](https://da.wordpress.org/plugins/bj-lazy-load/)
|
177 |
+
- [Owl Carousel 2](https://owlcarousel2.github.io/OwlCarousel2/)
|
178 |
+
|
179 |
+
= When is feature X coming? =
|
180 |
+
No schedule. I move forward as time allows. I currently spend a lot of time answering questions in the support forum. If someone would be nice and help out answering questions here, it would allow me to spend that time developing. Also, donations would allow me to turn down some of the more boring requests from my customers, and speed things up here.
|
181 |
+
|
182 |
+
Here are my loose plans ahead: The 0.9 release will add redirect rule in .htaccess (optionally), perhaps also include configurable destination. 0.10 will probably be some diagnose tool – this should release some time spend in the forum. 0.11 could be focused on PNG. 0.12 might be displaying rules for NGINX. 0.13 might be supporting Save-Data header (send extra compressed images to clients who wants to use as little bandwidth as possible). 0.14 might be multisite support. 0.15 might be a file manager-like interface for inspecting generated webp files. 0.16 might be WAMP support. This is all guessing. I’m only planning one milestone at the time. You can follow the issue queue here: https://github.com/rosell-dk/webp-express/issues
|
183 |
+
|
184 |
+
If you wish to affect priorities, it is certainly possible. You can try to argue your case in the forum or you can simply let the money do the talking. By donating as little as a cup of coffee on [ko-fi.com/rosell](https://ko-fi.com/rosell), you can leave a wish. I shall take these wishes into account when prioritizing between new features.
|
185 |
+
|
186 |
+
|
187 |
= How do I buy you a cup of coffee? =
|
188 |
Easy enough! - [Go here!](https://ko-fi.com/rosell)
|
189 |
|
193 |
|
194 |
== Changelog ==
|
195 |
|
196 |
+
= 0.8.1 =
|
197 |
+
* Fixed javascript bug
|
198 |
+
|
199 |
= 0.8.0 =
|
200 |
* New conversion method, which calls imagick binary directly. This will make WebP express work out of the box on more systems
|
201 |
* Made sure not to trigger LFI warning i Wordfence (to activate, click the force .htaccess button)
|
changelog.txt
CHANGED
@@ -1,4 +1,9 @@
|
|
|
|
|
|
|
|
|
|
1 |
= 0.8.0 =
|
|
|
2 |
* New conversion method, which calls imagick binary directly. This will make WebP express work out of the box on more systems
|
3 |
* Made sure not to trigger LFI warning i Wordfence (to activate, click the force .htaccess button)
|
4 |
* Imagick can now be configured to set quality to auto on systems where the auto option isn't generally available
|
1 |
+
= 0.8.1 =
|
2 |
+
* (released 11 dec 2018) *
|
3 |
+
* Fixed javascript bug
|
4 |
+
|
5 |
= 0.8.0 =
|
6 |
+
* (released 11 dec 2018) *
|
7 |
* New conversion method, which calls imagick binary directly. This will make WebP express work out of the box on more systems
|
8 |
* Made sure not to trigger LFI warning i Wordfence (to activate, click the force .htaccess button)
|
9 |
* Imagick can now be configured to set quality to auto on systems where the auto option isn't generally available
|
lib/options/js/converters.js
CHANGED
@@ -350,13 +350,12 @@ function updateConverterOptions() {
|
|
350 |
setConverterOption(converter, 'quality', 'auto');
|
351 |
setConverterOption(converter, 'max-quality', document.getElementById(id + '_max_quality').value);
|
352 |
} else {
|
353 |
-
//delete converter['options']['quality'];
|
354 |
setConverterOption(converter, 'quality', 'inherit');
|
355 |
-
|
356 |
}
|
357 |
} else {
|
358 |
-
|
359 |
-
|
360 |
}
|
361 |
|
362 |
switch (converter['converter']) {
|
350 |
setConverterOption(converter, 'quality', 'auto');
|
351 |
setConverterOption(converter, 'max-quality', document.getElementById(id + '_max_quality').value);
|
352 |
} else {
|
|
|
353 |
setConverterOption(converter, 'quality', 'inherit');
|
354 |
+
deleteConverterOption(converter, 'max-quality');
|
355 |
}
|
356 |
} else {
|
357 |
+
deleteConverterOption(converter, 'quality');
|
358 |
+
deleteConverterOption(converter, 'max-quality');
|
359 |
}
|
360 |
|
361 |
switch (converter['converter']) {
|
webp-express.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
-
* Version: 0.8.
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|
3 |
* Plugin Name: WebP Express
|
4 |
* Plugin URI: https://github.com/rosell-dk/webp-express
|
5 |
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
|
6 |
+
* Version: 0.8.1
|
7 |
* Author: Bjørn Rosell
|
8 |
* Author URI: https://www.bitwise-it.dk
|
9 |
* License: GPL2
|