WebP Express - Version 0.9.1

Version Description

Fixed critical bug causing options page to go blank

Download this release

Release Info

Developer rosell.dk
Plugin Icon 128x128 WebP Express
Version 0.9.1
Comparing to
See all releases

Code changes from version 0.9.0 to 0.9.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://ko-fi.com/rosell
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 5.0
7
- Stable tag: 0.9.0
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -124,18 +124,28 @@ Easy enough. Browsers looks at the *content type* header rather than the URL to
124
  I am btw considering making an option to have the plugin redirect to the webp instead of serving immediately. That would remove the apparent mismatch between file extension and content type header. However, the cost of doing that will be an extra request for each image, which means extra time and worse performance. I believe you'd be ill advised to use that option, so I guess I will not implement it. But perhaps you have good reasons to use it? If you do, please let me know!
125
 
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 or the configuration file for the site, found in `/etc/nginx/sites-available`). For standard wordpress installations, the following rules should work:
128
 
129
- ```
 
 
 
130
  if ($http_accept ~* "webp"){
131
  rewrite ^/(.*).(jpe?g|png)$ /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content break;
132
  }
133
- ```
 
 
 
 
 
 
 
 
134
  *Beware:* If you copy the code above, you might get an html-encoded ampersand before "wp-content"
135
 
136
- The `wp-content` argument must point to the wp-content folder (relative to document root). In most installations, it is 'wp-content'.
137
 
138
- Note that the rules above redirects every image request to the PHP script. To get better performance, you can add a rule that redirects jpeg/png requests directly to existing webp images. There are some rules for that [here](https://www.keycdn.com/blog/convert-to-webp-the-successor-of-jpeg#rewriterules-for-nginx-nginx-conf), but they need to be modified because WebP Express stores the webp files in a different location (`wp-content/webp-express/webp-images/doc-root`).
139
 
140
  Discussion on this topic [here](https://wordpress.org/support/topic/nginx-rewrite-rules-4/)
141
 
@@ -157,21 +167,6 @@ The plugin takes care of setting the "Vary" HTTP header to "Accept" when routing
157
  https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values#Values_for_an_image
158
  - so it is not an issue.
159
 
160
- In the 0.10.0 release, you will have another (and better) option, as [described here](https://github.com/rosell-dk/webp-express/issues/133)
161
-
162
- = I am on Cloudflare =
163
- Without configuration, Cloudflare will not maintain separate caches for jpegs and webp; all browsers will get jpeg. To make Cloudflare cache not only by URL, but also by header, you need to use the [Custom Cache Key](https://support.cloudflare.com/hc/en-us/articles/115004290387) page rule, and add *Header content* to make separate caches depending on the *Accept* request header.
164
-
165
- However, the *Custom Cache Key* rule currently requires an *Enterprise* account. And if you already have that, you may as well go with the *Polish* feature, which starts at the “Pro” level plan. With the *Polish* feature, you will not need WebP Express.
166
-
167
- To make *WebP Express* work on a free Cloudflare account, you have the following choices:
168
-
169
- 1. You can configure the CDN not to cache jpeg images by adding the following page rule: If rule matches: `example.com/*.jpg`, set: *Cache level* to: *Bypass*
170
-
171
- 2. You can set up another CDN (on another provider), which you just use for handling the images. You need to configure that CDN to forward the *Accept header*. You also need to install a Wordpress plugin that points images to that CDN.
172
-
173
- In the 0.10.0 release, you will have another (and better) option, as [described here](https://github.com/rosell-dk/webp-express/issues/133)
174
-
175
  = Does it work with lazy loaded images? =
176
  No plugins/frameworks has yet been discovered, which does not work with *WebP Express*.
177
 
@@ -184,10 +179,11 @@ The following lazy load plugins/frameworks has been tested and works with *WebP
184
  = When is feature X coming? =
185
  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.
186
 
187
- Here are my loose plans ahead: The 0.10 release adds possibility to configure where the generated webp files are located. This together with a few other new options allows WebP Express to work together with the [Cache Enabler](https://wordpress.org/plugins/cache-enabler/) plugin. This is a great combination, which eliminates the need to redirect jpeg to webp. Read more about it [here](https://github.com/rosell-dk/webp-express/issues/133). The 0.11 release will probably add a some diagnose tool – this should release some time spend in the forum. 0.12 could be focused on PNG. 0.13 might be displaying rules for NGINX. 0.14 might be supporting Save-Data header (send extra compressed images to clients who wants to use as little bandwidth as possible). 0.15 might be multisite support. 0.16 might be a file manager-like interface for inspecting generated webp files. 0.17 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
188
 
189
  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.
190
 
 
191
  = How do I buy you a cup of coffee? =
192
  Easy enough! - [Go here!](https://ko-fi.com/rosell). Or [here](https://buymeacoff.ee/rosell).
193
 
@@ -273,6 +269,9 @@ For older releases, check out changelog.txt
273
 
274
  == Upgrade Notice ==
275
 
 
 
 
276
  = 0.9.0 =
277
  Option to redirect to existing webp images directly in .htaccess (improves performance)
278
 
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 5.0
7
+ Stable tag: 0.9.1
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
124
  I am btw considering making an option to have the plugin redirect to the webp instead of serving immediately. That would remove the apparent mismatch between file extension and content type header. However, the cost of doing that will be an extra request for each image, which means extra time and worse performance. I believe you'd be ill advised to use that option, so I guess I will not implement it. But perhaps you have good reasons to use it? If you do, please let me know!
125
 
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
 
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
 
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). Or [here](https://buymeacoff.ee/rosell).
189
 
269
 
270
  == Upgrade Notice ==
271
 
272
+ = 0.9.1 =
273
+ Fixed critical bug causing options page to go blank
274
+
275
  = 0.9.0 =
276
  Option to redirect to existing webp images directly in .htaccess (improves performance)
277
 
changelog.txt CHANGED
@@ -1,5 +1,9 @@
 
 
 
 
1
  = 0.9.0 =
2
- * (released 27 dec 2018) *
3
  * Optionally make .htaccess redirect directly to existing webp (improves performance)
4
  * Optionally do not send filename from .htaccess to the PHP in Querystring, but use other means (improves security and reduces risks of problems due to firewall rules)
5
  * Fixed some bugs
1
+ = 0.9.1 =
2
+ (released 28 dec 2018)
3
+ * Fixed critical bug causing blank page on options page
4
+
5
  = 0.9.0 =
6
+ (released 27 dec 2018)
7
  * Optionally make .htaccess redirect directly to existing webp (improves performance)
8
  * Optionally do not send filename from .htaccess to the PHP in Querystring, but use other means (improves security and reduces risks of problems due to firewall rules)
9
  * Fixed some bugs
lib/classes/Config.php CHANGED
@@ -188,16 +188,17 @@ class Config
188
  $converterId = $converter['converter'];
189
  $hasError = isset($testResult['errors'][$converterId]);
190
  $working = !$hasError;
 
191
  if (isset($converter['working']) && ($converter['working'] != $working)) {
192
  if ($working) {
193
  Messenger::printMessage(
194
  'info',
195
- 'Hurray! - The <i>' . webpexpress_converterName($converterId) . '</i> conversion method is working now!'
196
  );
197
  } else {
198
  Messenger::printMessage(
199
  'warning',
200
- 'Sad news. The <i>' . webpexpress_converterName($converterId) . '</i> conversion method is not working anymore. What happened?'
201
  );
202
  }
203
  }
188
  $converterId = $converter['converter'];
189
  $hasError = isset($testResult['errors'][$converterId]);
190
  $working = !$hasError;
191
+
192
  if (isset($converter['working']) && ($converter['working'] != $working)) {
193
  if ($working) {
194
  Messenger::printMessage(
195
  'info',
196
+ 'Hurray! - The <i>' . $converterId . '</i> conversion method is working now!'
197
  );
198
  } else {
199
  Messenger::printMessage(
200
  'warning',
201
+ 'Sad news. The <i>' . $converterId . '</i> conversion method is not working anymore. What happened?'
202
  );
203
  }
204
  }
lib/options/enqueue_scripts.php CHANGED
@@ -6,7 +6,7 @@ use \WebPExpress\Paths;
6
  include_once __DIR__ . '/../classes/Config.php';
7
  use \WebPExpress\Config;
8
 
9
- $version = '0.9.0';
10
 
11
  function webp_express_add_inline_script($id, $script, $position) {
12
  if (function_exists('wp_add_inline_script')) {
6
  include_once __DIR__ . '/../classes/Config.php';
7
  use \WebPExpress\Config;
8
 
9
+ $version = '0.9.1';
10
 
11
  function webp_express_add_inline_script($id, $script, $position) {
12
  if (function_exists('wp_add_inline_script')) {
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.9.0
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.9.1
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2