WebP Express - Version 0.14.21

Version Description

(released: 30 jun 2019)

  • Hopefully fixed WebP Express Error: "png" option is Object
Download this release

Release Info

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

Code changes from version 0.14.20 to 0.14.21

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.2
7
- Stable tag: 0.14.20
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -16,10 +16,7 @@ Serve autogenerated WebP images instead of jpeg/png to browsers that supports We
16
  Almost 4 out of 5 mobile users use a browser that is able to display webp images. Yet, on most websites, they are served jpeg images, which are typically double the size of webp images for a given quality. What a waste of bandwidth! This plugin was created to help remedy that situation. With little effort, Wordpress admins can have their site serving autogenerated webp images to browsers that supports it, while still serving jpeg and png files to browsers that does not support webp.
17
 
18
  !! **SECURITY NOTICE** !!
19
- Security issues has recently been found and fixed. I urge you to upgrade to the latest release (at least 0.14.11, but go with 0.14.19, as there are important bug fixes)
20
-
21
- **VACATION NOTICE**
22
- The maintainer is on vacation between June the 30th and end July. Please help each other out. In case something cannot wait, remember that this library is open source. You can find it on github, fork it and fix it (or have someone do it for you).
23
 
24
 
25
  ### The image converter
@@ -44,10 +41,6 @@ The plugin builds on [WebPConvert](https://github.com/rosell-dk/webp-convert) an
44
  - Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
45
  - Currently ~73% of all traffic, and ~79% of mobile browsing traffic are done with browsers supporting webp. With Mozilla and Microsoft [finally on board](https://medium.com/@richard_90141/webp-image-support-an-8-year-saga-7aa2bedb8d02), these numbers are bound to increase. Check current numbers on [caniuse.com](https://caniuse.com/webp)).
46
 
47
- ### Recent news
48
- Jun 2019: Better conversions and more conversion options
49
- Feb 2019: Multisite is now supported (0.12.0)
50
- Jan 2019: Plugin can now alter HTML (0.11.0)
51
 
52
  == Installation ==
53
 
@@ -158,7 +151,10 @@ Easy enough. Browsers looks at the *content type* header rather than the URL to
158
  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!
159
 
160
  = I am on NGINX / OpenResty =
161
- It is possible to make WebP Express work on NGINX, but it requires manually inserting redirection rules in the NGINX configuration file (nginx.conf or the configuration file for the site, found in `/etc/nginx/sites-available`).
 
 
 
162
 
163
  There are two different approaches to achieve the redirections. One based on *rewrite* and one based on *try_files*. As *try_files* performs best, I shall recommend that.
164
 
@@ -612,11 +608,15 @@ Easy enough! - [Go here!](https://ko-fi.com/rosell). Or [here](https://buymeacof
612
 
613
  == Changelog ==
614
 
 
 
 
 
 
615
  = 0.14.20 =
616
  *(released: 29 jun 2019)*
617
 
618
- * Fixed bug: Ewww api-key was forgot upon saving options (fixed by pcfreak30, USA, reported by viajandocomamalarosa. Thanks!)
619
- * Cleaned away unneeded files in vendor folders (primarily docs and tests)
620
 
621
  = 0.14.19 =
622
  *(released: 28 jun 2019)*
@@ -920,6 +920,9 @@ For older releases, check out changelog.txt
920
 
921
  == Upgrade Notice ==
922
 
 
 
 
923
  = 0.14.20 =
924
  * Ewww api-key was forgotten upon saving options
925
 
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
+ Stable tag: 0.14.21
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
16
  Almost 4 out of 5 mobile users use a browser that is able to display webp images. Yet, on most websites, they are served jpeg images, which are typically double the size of webp images for a given quality. What a waste of bandwidth! This plugin was created to help remedy that situation. With little effort, Wordpress admins can have their site serving autogenerated webp images to browsers that supports it, while still serving jpeg and png files to browsers that does not support webp.
17
 
18
  !! **SECURITY NOTICE** !!
19
+ Security issues has recently been found and fixed. I urge you to upgrade to the latest release (at least 0.14.11, but go with 0.14.21, as there are important bug fixes)
 
 
 
20
 
21
 
22
  ### The image converter
41
  - Less bandwidth consumption - makes a huge difference in the parts of the world where the internet is slow and costly (you know, ~80% of the world population lives under these circumstances).
42
  - Currently ~73% of all traffic, and ~79% of mobile browsing traffic are done with browsers supporting webp. With Mozilla and Microsoft [finally on board](https://medium.com/@richard_90141/webp-image-support-an-8-year-saga-7aa2bedb8d02), these numbers are bound to increase. Check current numbers on [caniuse.com](https://caniuse.com/webp)).
43
 
 
 
 
 
44
 
45
  == Installation ==
46
 
151
  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!
152
 
153
  = I am on NGINX / OpenResty =
154
+ The easy solution is simply to use the plugin in "CDN friendly" mode, do a bulk conversion and activate the "Convert on upload" option.
155
+
156
+ This however does not cover images in CSS and images being dynamically added with javascript.
157
+ To get this working, requires manually inserting redirection rules in the NGINX configuration file (nginx.conf or the configuration file for the site, found in `/etc/nginx/sites-available`).
158
 
159
  There are two different approaches to achieve the redirections. One based on *rewrite* and one based on *try_files*. As *try_files* performs best, I shall recommend that.
160
 
608
 
609
  == Changelog ==
610
 
611
+ = 0.14.21 =
612
+ *(released: 30 jun 2019)*
613
+
614
+ * Hopefully fixed WebP Express Error: "png" option is Object
615
+
616
  = 0.14.20 =
617
  *(released: 29 jun 2019)*
618
 
619
+ * Fixed bug: Ewww api-key was forgot upon saving options
 
620
 
621
  = 0.14.19 =
622
  *(released: 28 jun 2019)*
920
 
921
  == Upgrade Notice ==
922
 
923
+ = 0.14.21 =
924
+ * Hopefully fixed WebP Express Error: "png" option is Object
925
+
926
  = 0.14.20 =
927
  * Ewww api-key was forgotten upon saving options
928
 
lib/classes/ConvertHelperIndependent.php CHANGED
@@ -329,7 +329,7 @@ APACHE
329
 
330
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
331
 
332
- $text = 'WebP Express 0.14.19. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
333
 
334
  $logFile = self::getLogFilename($source, $logDir);
335
 
329
 
330
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
331
 
332
+ $text = 'WebP Express 0.14.21. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
333
 
334
  $logFile = self::getLogFilename($source, $logDir);
335
 
vendor/rosell-dk/webp-convert-cloud-service/src/Serve.php CHANGED
@@ -112,7 +112,7 @@ class Serve
112
 
113
  if (isset($_POST['options'])) {
114
  // Merge in options in $_POST, overwriting the webp-convert options in config
115
- $convertOptionsInPost = (array) json_decode($_POST['options']);
116
  $convertOptions = array_merge($options['webp-convert'], $convertOptionsInPost);
117
  } else {
118
  $convertOptions = $options['webp-convert'];
112
 
113
  if (isset($_POST['options'])) {
114
  // Merge in options in $_POST, overwriting the webp-convert options in config
115
+ $convertOptionsInPost = (array) json_decode($_POST['options'], true);
116
  $convertOptions = array_merge($options['webp-convert'], $convertOptionsInPost);
117
  } else {
118
  $convertOptions = $options['webp-convert'];
vendor/rosell-dk/webp-convert/.gitattributes DELETED
@@ -1,4 +0,0 @@
1
- /tests export-ignore
2
- /.gitattributes export-ignore
3
- /.gitignore export-ignore
4
- /.travis.yml export-ignore
 
 
 
 
vendor/rosell-dk/webp-convert/.travis.yml DELETED
@@ -1,134 +0,0 @@
1
-
2
- # Other projects which deals with images in PHP and uses travis:
3
- # https://github.com/JBZoo/Image
4
- # https://travis-ci.org/peter279k/php-image-converter/builds
5
-
6
- language: php
7
-
8
- #php:
9
- # - 5.6
10
- # - 7.1
11
- # - 7.2
12
- # - 7.3
13
-
14
- # cache composer?
15
- # https://blog.wyrihaximus.net/2015/07/composer-cache-on-travis/
16
- # https://github.com/thephpleague/glide/blob/master/.travis.yml
17
- cache:
18
- #apt: true
19
- directories:
20
- - "$HOME/opt" # cache our imagick/gmagick install
21
- - $HOME/vips
22
-
23
- addons:
24
- apt:
25
- packages:
26
- - libjpeg-dev
27
- - libpng-dev
28
- - libwebp-dev
29
-
30
- # following for vips (taken from https://github.com/libvips/php-vips/blob/master/.travis.yml)
31
- - gobject-introspection
32
- - libcfitsio3-dev
33
- - libfftw3-dev
34
- - libgif-dev
35
- - libgs-dev
36
- - libgsf-1-dev
37
- - libmatio-dev
38
- - libopenslide-dev
39
- - liborc-0.4-dev
40
- - libpango1.0-dev
41
- - libpoppler-glib-dev
42
-
43
- sudo: false
44
-
45
- matrix:
46
- fast_finish: true
47
- include:
48
- - name: "Rather new setup (PHP 7.3, Xenial)"
49
- php: 7.3
50
- #dist: trusty
51
- dist: xenial
52
- #dist: bionic
53
- env:
54
- - UPLOADCOVERAGE=0
55
- - PHPSTAN=1
56
- - TESTSRCBUILD=0
57
- - INSTALLVIPS=1
58
- #- VIPS_VERSION="8.6.3"
59
- - VIPS_VERSION="8.7.4"
60
- - INSTALLIMAGEMAGICK=0 # imagemagick.org is currently down... - so installation cannot download gzip
61
- #- IMAGEMAGICK_VERSION="7.0.8-43"
62
-
63
- - name: "Standard setup (PHP 7.1, Xenial) - with coverage upload"
64
- php: 7.1
65
- #dist: trusty
66
- dist: xenial
67
- #dist: bionic
68
- env:
69
- - UPLOADCOVERAGE=1
70
- - PHPSTAN=1
71
- - TESTSRCBUILD=1
72
- - INSTALLVIPS=1
73
- - VIPS_VERSION="8.6.3"
74
- #- VIPS_VERSION="8.7.4"
75
- - INSTALLIMAGICK=1
76
- - IMAGEMAGICK_VERSION="7.0.8-43"
77
-
78
- - name: "Old setup (PHP 5.6, Trusty)"
79
- php: 5.6
80
- dist: trusty
81
- #dist: xenial
82
- #dist: bionic
83
- env:
84
- - UPLOADCOVERAGE=0
85
- - PHPSTAN=0
86
- - TESTSRCBUILD=0
87
- - INSTALLVIPS=0
88
- #- VIPS_VERSION="8.7.4"
89
- - INSTALLIMAGEMAGICK=0 # imagemagick.org is currently down... - so installation cannot download gzip
90
- #allow_failures:
91
-
92
- before_install:
93
- # VIPS
94
- - if [[ $INSTALLVIPS == 1 ]]; then bash install-vips.sh; fi
95
-
96
- # Update PATH so that travis can find our imagemagick / gmagick
97
- - export PATH=$HOME/opt/bin:$PATH
98
-
99
- # ImageMagick
100
- - if [[ $INSTALLIMAGEMAGICK == 1 ]]; then bash install-imagemagick-with-webp.sh; fi
101
-
102
- # install imagick extension (if not already there)
103
- # hm, not working
104
- #- echo '' | pecl install imagick
105
-
106
- # GMagick
107
-
108
- - bash install-gmagick-with-webp.sh
109
- #- export GMAGICK_PATH=$HOME/opt/bin
110
-
111
- # Hm, extension is not working yet. When I get to install the extension I get the message:
112
- # "Please provide a path to GraphicsMagick-config program."
113
- # According to here: https://stackoverflow.com/questions/8626558/please-provide-the-prefix-of-graphicsmagick-installation-autodetect
114
- # it is because the libgraphicsmagick1-dev package is not installed
115
- # But is that needed when we are building ?
116
- #- echo '' | pecl install gmagick-beta
117
-
118
- before_script:
119
- #- echo $PATH
120
- - (composer self-update; true)
121
- - composer install
122
- - if [[ $PHPSTAN == 1 ]]; then composer require --dev phpstan/phpstan:"^0.11.5"; fi
123
-
124
- script:
125
- - if [[ $TESTSRCBUILD == 1 ]]; then composer test-src-build; fi
126
- - composer test-src
127
- - if [[ $PHPSTAN == 1 ]]; then vendor/bin/phpstan analyse src --level=4; fi
128
-
129
- after_script:
130
- - |
131
- if [[ $UPLOADCOVERAGE == 1 ]]; then
132
- wget https://scrutinizer-ci.com/ocular.phar
133
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
134
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.14.20
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.14.21
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2