WebP Express - Version 0.17.2

Version Description

(released: 5 Oct 2019)

  • Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
  • Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.

If you experienced update problems due to the update bug, you will probably be left with an incomplete installation. Some of the plugin files are there, but not all. Especially, the main plugin file (webp-express.php) is missing, which means that Wordpress don't "see" the plugin (it is missing from the list). Trying to install WebP Express again will probably not work, because the "webp-express" folder is already there. You will then have to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager).

For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1

Download this release

Release Info

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

Code changes from version 0.17.1 to 0.17.2

Files changed (25) hide show
  1. README.md +8 -0
  2. README.txt +17 -1
  3. changelog.txt +10 -0
  4. composer.json +1 -1
  5. composer.lock +6 -6
  6. lib/classes/AlterHtmlHelper.php +6 -5
  7. lib/classes/ConvertHelperIndependent.php +1 -1
  8. vendor/composer/autoload_classmap.php +0 -84
  9. vendor/composer/autoload_static.php +0 -88
  10. vendor/composer/installed.json +6 -6
  11. vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php +1 -1
  12. vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php +34 -2
  13. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.0-fbsd → cwebp-060-fbsd} +0 -0
  14. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.0-solaris → cwebp-060-solaris} +0 -0
  15. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.1-linux-x86-64 → cwebp-061-linux-x86-64} +0 -0
  16. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-linux-x86-64 → cwebp-103-linux-x86-64} +0 -0
  17. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-linux-x86-64-static → cwebp-103-linux-x86-64-static} +0 -0
  18. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-mac-10.14 → cwebp-103-mac-10_14} +0 -0
  19. vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-windows-x64.exe → cwebp-103-windows-x64.exe} +0 -0
  20. vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php +121 -48
  21. vendor/rosell-dk/webp-convert/src/Helpers/BinaryDiscovery.php +107 -0
  22. vendor/rosell-dk/webp-convert/src/Helpers/FileExists.php +118 -0
  23. vendor/rosell-dk/webp-convert/src/Helpers/MimeType.php +2 -2
  24. vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php +8 -12
  25. webp-express.php +1 -1
README.md CHANGED
@@ -651,6 +651,14 @@ Here are my current plans ahead: 0.17 will probably be a file manager-like inter
651
 
652
  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.
653
 
 
 
 
 
 
 
 
 
654
  ## Changes in 0.17.1
655
  *(released: 3 Oct 2019)*
656
 
651
 
652
  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.
653
 
654
+ ## Changes in 0.17.2
655
+ *(released: 5 Oct 2019)*
656
+
657
+ * Fixed bug: Updating plugin failed on some systems (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
658
+ * Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.
659
+
660
+ For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1
661
+
662
  ## Changes in 0.17.1
663
  *(released: 3 Oct 2019)*
664
 
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.17.1
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -643,6 +643,9 @@ RewriteRule . - [L]
643
  `
644
  If you got any further questions, look at, or comment on [this topic](https://wordpress.org/support/topic/can-i-make-an-exception-for-specific-post-image/)
645
 
 
 
 
646
  = When is feature X coming? / Roadmap =
647
  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.
648
 
@@ -659,6 +662,16 @@ Easy enough! - [Go here!](https://ko-fi.com/rosell). Or [here](https://buymeacof
659
 
660
  == Changelog ==
661
 
 
 
 
 
 
 
 
 
 
 
662
  = 0.17.1 =
663
  *(released: 3 Oct 2019)*
664
 
@@ -1050,6 +1063,9 @@ For older releases, check out changelog.txt
1050
 
1051
  == Upgrade Notice ==
1052
 
 
 
 
1053
  = 0.17.1 =
1054
  * Miscellaneous bug fixes. Including the NGINX rules in the FAQ (added "xdestination" argument to webp-realizer.php). Now works with WP Engine.
1055
 
4
  Tags: webp, images, performance
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
+ Stable tag: 0.17.2
8
  Requires PHP: 5.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
643
  `
644
  If you got any further questions, look at, or comment on [this topic](https://wordpress.org/support/topic/can-i-make-an-exception-for-specific-post-image/)
645
 
646
+ = Update failed and cannot reinstall =
647
+ The 0.17.0 release contained binaries with dots in their filenames, which caused the unpacking during update to fail on a few systems. This failure could leave an incomplete installation. With important files missing - such as the main plugin file - Wordpress no longer registers that the plugin is there (it is missing from the list). However, the folder is there in the file system and trying to install WebP Express again fails because Wordpress complains about just that. The solution is to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager) and then install WebP Express anew. The setting will be intact. The filenames that caused the trouble where fixed in 0.17.2.
648
+
649
  = When is feature X coming? / Roadmap =
650
  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.
651
 
662
 
663
  == Changelog ==
664
 
665
+ = 0.17.2 =
666
+ *(released: 5 Oct 2019)*
667
+
668
+ * Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
669
+ * Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.
670
+
671
+ If you experienced update problems due to the update bug, you will probably be left with an incomplete installation. Some of the plugin files are there, but not all. Especially, the main plugin file (webp-express.php) is missing, which means that Wordpress don't "see" the plugin (it is missing from the list). Trying to install WebP Express again will probably not work, because the "webp-express" folder is already there. You will then have to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager).
672
+
673
+ For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1
674
+
675
  = 0.17.1 =
676
  *(released: 3 Oct 2019)*
677
 
1063
 
1064
  == Upgrade Notice ==
1065
 
1066
+ = 0.17.2 =
1067
+ * Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). The problem was introduced in 0.17.0 where the binaries contains dots in their filename.
1068
+
1069
  = 0.17.1 =
1070
  * Miscellaneous bug fixes. Including the NGINX rules in the FAQ (added "xdestination" argument to webp-realizer.php). Now works with WP Engine.
1071
 
changelog.txt CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  = 0.17.1 =
2
  *(released: 3 Oct 2019)*
3
 
1
+ = 0.17.2 =
2
+ *(released: 5 Oct 2019)*
3
+
4
+ * Fixed bug: Updating plugin failed on a few hosts (in the unzip phase). Problem was introduced in 0.17.0 with the updated binaries.
5
+ * Fixed bug: Alter HTML used the protocol (http/https) for the site for generated links (rather than keeping the protocol for the link). Thanks to Jacob Gullberg from Sweden for discovering this bug.
6
+
7
+ If you experienced update problems due to the update bug, you will probably be left with an incomplete installation. Some of the plugin files are there, but not all. Especially, the main plugin file (webp-express.php) is missing, which means that Wordpress don't "see" the plugin (it is missing from the list). Trying to install WebP Express again will probably not work, because the "webp-express" folder is already there. You will then have to remove the "webp-express" folder in "plugins" manually (via ftp or a plugin, such as File Manager).
8
+
9
+ For more info, see the closed issues on the 0.17.2 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/29?closed=1
10
+
11
  = 0.17.1 =
12
  *(released: 3 Oct 2019)*
13
 
composer.json CHANGED
@@ -4,7 +4,7 @@
4
  "type": "project",
5
  "license": "MIT",
6
  "require": {
7
- "rosell-dk/webp-convert": "^2.1.5",
8
  "rosell-dk/webp-convert-cloud-service": "^2.0.0",
9
  "rosell-dk/dom-util-for-webp": "^0.3.1"
10
  },
4
  "type": "project",
5
  "license": "MIT",
6
  "require": {
7
+ "rosell-dk/webp-convert": "^2.3.0",
8
  "rosell-dk/webp-convert-cloud-service": "^2.0.0",
9
  "rosell-dk/dom-util-for-webp": "^0.3.1"
10
  },
composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "628e816c040c595618fbe0151b6021b0",
8
  "packages": [
9
  {
10
  "name": "rosell-dk/dom-util-for-webp",
@@ -118,16 +118,16 @@
118
  },
119
  {
120
  "name": "rosell-dk/webp-convert",
121
- "version": "2.2.2",
122
  "source": {
123
  "type": "git",
124
  "url": "https://github.com/rosell-dk/webp-convert.git",
125
- "reference": "1c3f7f228dfa1fc066ef90957c91f4b99f44dd45"
126
  },
127
  "dist": {
128
  "type": "zip",
129
- "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/1c3f7f228dfa1fc066ef90957c91f4b99f44dd45",
130
- "reference": "1c3f7f228dfa1fc066ef90957c91f4b99f44dd45",
131
  "shasum": ""
132
  },
133
  "require": {
@@ -190,7 +190,7 @@
190
  "png",
191
  "png2webp"
192
  ],
193
- "time": "2019-09-27T10:34:05+00:00"
194
  },
195
  {
196
  "name": "rosell-dk/webp-convert-cloud-service",
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "66c96d3268a657c647267f5e5eee8ca2",
8
  "packages": [
9
  {
10
  "name": "rosell-dk/dom-util-for-webp",
118
  },
119
  {
120
  "name": "rosell-dk/webp-convert",
121
+ "version": "2.3.0",
122
  "source": {
123
  "type": "git",
124
  "url": "https://github.com/rosell-dk/webp-convert.git",
125
+ "reference": "74991497d403c07de269623850722aa0f7d15542"
126
  },
127
  "dist": {
128
  "type": "zip",
129
+ "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/74991497d403c07de269623850722aa0f7d15542",
130
+ "reference": "74991497d403c07de269623850722aa0f7d15542",
131
  "shasum": ""
132
  },
133
  "require": {
190
  "png",
191
  "png2webp"
192
  ],
193
+ "time": "2019-10-05T18:32:17+00:00"
194
  },
195
  {
196
  "name": "rosell-dk/webp-convert-cloud-service",
lib/classes/AlterHtmlHelper.php CHANGED
@@ -185,17 +185,18 @@ class AlterHtmlHelper
185
  self::$options['destination-extension'],
186
  ($rootId == 'uploads')
187
  );
188
- $result['destination-url'] = $destinationRoot['url'] . '/' . $relPathFromImageRootToDest;
189
-
190
  $destPathAbs = $destinationRoot['abs-path'] . '/' . $relPathFromImageRootToDest;
191
- $destUrl = $destinationRoot['url'] . '/' . $relPathFromImageRootToDest;
192
-
193
  $webpMustExist = self::$options['only-for-webps-that-exists'];
194
  if ($webpMustExist && (!@file_exists($destPathAbs))) {
195
  return false;
196
  }
197
- return $destUrl;
198
 
 
 
 
 
 
 
199
  }
200
 
201
 
185
  self::$options['destination-extension'],
186
  ($rootId == 'uploads')
187
  );
 
 
188
  $destPathAbs = $destinationRoot['abs-path'] . '/' . $relPathFromImageRootToDest;
 
 
189
  $webpMustExist = self::$options['only-for-webps-that-exists'];
190
  if ($webpMustExist && (!@file_exists($destPathAbs))) {
191
  return false;
192
  }
 
193
 
194
+ $destUrl = $destinationRoot['url'] . '/' . $relPathFromImageRootToDest;
195
+
196
+ // Fix scheme (use same as source)
197
+ $sourceUrlComponents = parse_url($sourceUrl);
198
+ $destUrlComponents = parse_url($destUrl);
199
+ return $sourceUrlComponents['scheme'] . '://' . $sourceUrlComponents['host'] . $destUrlComponents['path'];
200
  }
201
 
202
 
lib/classes/ConvertHelperIndependent.php CHANGED
@@ -571,7 +571,7 @@ APACHE
571
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
572
 
573
  // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
574
- $text = 'WebP Express 0.17.1. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
575
 
576
  $logFile = self::getLogFilename($source, $logDir);
577
 
571
  $text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);
572
 
573
  // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
574
+ $text = 'WebP Express 0.17.2. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
575
 
576
  $logFile = self::getLogFilename($source, $logDir);
577
 
vendor/composer/autoload_classmap.php CHANGED
@@ -6,88 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'DOMUtilForWebP\\ImageUrlReplacer' => $vendorDir . '/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php',
10
- 'DOMUtilForWebP\\PictureTags' => $vendorDir . '/rosell-dk/dom-util-for-webp/src/PictureTags.php',
11
- 'ImageMimeTypeGuesser\\Detectors\\AbstractDetector' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/AbstractDetector.php',
12
- 'ImageMimeTypeGuesser\\Detectors\\ExifImageType' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/ExifImageType.php',
13
- 'ImageMimeTypeGuesser\\Detectors\\FInfo' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/FInfo.php',
14
- 'ImageMimeTypeGuesser\\Detectors\\GetImageSize' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php',
15
- 'ImageMimeTypeGuesser\\Detectors\\MimeContentType' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php',
16
- 'ImageMimeTypeGuesser\\Detectors\\SniffFirstFourBytes' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php',
17
- 'ImageMimeTypeGuesser\\Detectors\\Stack' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/Detectors/Stack.php',
18
- 'ImageMimeTypeGuesser\\GuessFromExtension' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php',
19
- 'ImageMimeTypeGuesser\\ImageMimeTypeGuesser' => $vendorDir . '/rosell-dk/image-mime-type-guesser/src/ImageMimeTypeGuesser.php',
20
- 'WebPConvertCloudService\\AccessCheck' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php',
21
- 'WebPConvertCloudService\\Serve' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/Serve.php',
22
- 'WebPConvertCloudService\\WebPConvertCloudService' => $vendorDir . '/rosell-dk/webp-convert-cloud-service/src/WebPConvertCloudService.php',
23
- 'WebPConvert\\Convert\\ConverterFactory' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/ConverterFactory.php',
24
- 'WebPConvert\\Convert\\Converters\\AbstractConverter' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php',
25
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\AutoQualityTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/AutoQualityTrait.php',
26
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\DestinationPreparationTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/DestinationPreparationTrait.php',
27
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\LoggerTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php',
28
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\OptionsTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php',
29
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\WarningLoggerTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php',
30
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CloudConverterTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CloudConverterTrait.php',
31
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CurlTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CurlTrait.php',
32
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\EncodingAutoTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php',
33
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\ExecTrait' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php',
34
- 'WebPConvert\\Convert\\Converters\\Cwebp' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php',
35
- 'WebPConvert\\Convert\\Converters\\Ewww' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php',
36
- 'WebPConvert\\Convert\\Converters\\Gd' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Gd.php',
37
- 'WebPConvert\\Convert\\Converters\\Gmagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php',
38
- 'WebPConvert\\Convert\\Converters\\GmagickBinary' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/GmagickBinary.php',
39
- 'WebPConvert\\Convert\\Converters\\GraphicsMagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php',
40
- 'WebPConvert\\Convert\\Converters\\ImageMagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php',
41
- 'WebPConvert\\Convert\\Converters\\Imagick' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php',
42
- 'WebPConvert\\Convert\\Converters\\ImagickBinary' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/ImagickBinary.php',
43
- 'WebPConvert\\Convert\\Converters\\Stack' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Stack.php',
44
- 'WebPConvert\\Convert\\Converters\\Vips' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Vips.php',
45
- 'WebPConvert\\Convert\\Converters\\Wpc' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php',
46
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailedException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailedException.php',
47
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConversionSkippedException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConversionSkippedException.php',
48
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperationalException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperationalException.php',
49
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\InvalidApiKeyException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/InvalidApiKeyException.php',
50
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\SystemRequirementsNotMetException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/SystemRequirementsNotMetException.php',
51
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblemsException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblemsException.php',
52
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFileException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFileException.php',
53
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFolderException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFolderException.php',
54
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInputException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInputException.php',
55
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\ConverterNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/ConverterNotFoundException.php',
56
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\InvalidImageTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/InvalidImageTypeException.php',
57
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\TargetNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/TargetNotFoundException.php',
58
- 'WebPConvert\\Convert\\Helpers\\JpegQualityDetector' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Helpers/JpegQualityDetector.php',
59
- 'WebPConvert\\Convert\\Helpers\\PhpIniSizes' => $vendorDir . '/rosell-dk/webp-convert/src/Convert/Helpers/PhpIniSizes.php',
60
- 'WebPConvert\\Exceptions\\InvalidInputException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php',
61
- 'WebPConvert\\Exceptions\\InvalidInput\\InvalidImageTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php',
62
- 'WebPConvert\\Exceptions\\InvalidInput\\TargetNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php',
63
- 'WebPConvert\\Exceptions\\WebPConvertException' => $vendorDir . '/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php',
64
- 'WebPConvert\\Helpers\\InputValidator' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/InputValidator.php',
65
- 'WebPConvert\\Helpers\\MimeType' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/MimeType.php',
66
- 'WebPConvert\\Helpers\\PathChecker' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/PathChecker.php',
67
- 'WebPConvert\\Helpers\\Sanitize' => $vendorDir . '/rosell-dk/webp-convert/src/Helpers/Sanitize.php',
68
- 'WebPConvert\\Loggers\\BaseLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/BaseLogger.php',
69
- 'WebPConvert\\Loggers\\BufferLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/BufferLogger.php',
70
- 'WebPConvert\\Loggers\\EchoLogger' => $vendorDir . '/rosell-dk/webp-convert/src/Loggers/EchoLogger.php',
71
- 'WebPConvert\\Options\\ArrayOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/ArrayOption.php',
72
- 'WebPConvert\\Options\\BooleanOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/BooleanOption.php',
73
- 'WebPConvert\\Options\\Exceptions\\InvalidOptionTypeException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionTypeException.php',
74
- 'WebPConvert\\Options\\Exceptions\\InvalidOptionValueException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionValueException.php',
75
- 'WebPConvert\\Options\\Exceptions\\OptionNotFoundException' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Exceptions/OptionNotFoundException.php',
76
- 'WebPConvert\\Options\\GhostOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/GhostOption.php',
77
- 'WebPConvert\\Options\\IntegerOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/IntegerOption.php',
78
- 'WebPConvert\\Options\\IntegerOrNullOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/IntegerOrNullOption.php',
79
- 'WebPConvert\\Options\\MetadataOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/MetadataOption.php',
80
- 'WebPConvert\\Options\\Option' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Option.php',
81
- 'WebPConvert\\Options\\Options' => $vendorDir . '/rosell-dk/webp-convert/src/Options/Options.php',
82
- 'WebPConvert\\Options\\QualityOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/QualityOption.php',
83
- 'WebPConvert\\Options\\SensitiveArrayOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/SensitiveArrayOption.php',
84
- 'WebPConvert\\Options\\SensitiveStringOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/SensitiveStringOption.php',
85
- 'WebPConvert\\Options\\StringOption' => $vendorDir . '/rosell-dk/webp-convert/src/Options/StringOption.php',
86
- 'WebPConvert\\Serve\\Exceptions\\ServeFailedException' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Exceptions/ServeFailedException.php',
87
- 'WebPConvert\\Serve\\Header' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Header.php',
88
- 'WebPConvert\\Serve\\Report' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/Report.php',
89
- 'WebPConvert\\Serve\\ServeConvertedWebP' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php',
90
- 'WebPConvert\\Serve\\ServeConvertedWebPWithErrorHandling' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php',
91
- 'WebPConvert\\Serve\\ServeFile' => $vendorDir . '/rosell-dk/webp-convert/src/Serve/ServeFile.php',
92
- 'WebPConvert\\WebPConvert' => $vendorDir . '/rosell-dk/webp-convert/src/WebPConvert.php',
93
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  );
vendor/composer/autoload_static.php CHANGED
@@ -41,99 +41,11 @@ class ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243
41
  ),
42
  );
43
 
44
- public static $classMap = array (
45
- 'DOMUtilForWebP\\ImageUrlReplacer' => __DIR__ . '/..' . '/rosell-dk/dom-util-for-webp/src/ImageUrlReplacer.php',
46
- 'DOMUtilForWebP\\PictureTags' => __DIR__ . '/..' . '/rosell-dk/dom-util-for-webp/src/PictureTags.php',
47
- 'ImageMimeTypeGuesser\\Detectors\\AbstractDetector' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/AbstractDetector.php',
48
- 'ImageMimeTypeGuesser\\Detectors\\ExifImageType' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/ExifImageType.php',
49
- 'ImageMimeTypeGuesser\\Detectors\\FInfo' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/FInfo.php',
50
- 'ImageMimeTypeGuesser\\Detectors\\GetImageSize' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/GetImageSize.php',
51
- 'ImageMimeTypeGuesser\\Detectors\\MimeContentType' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php',
52
- 'ImageMimeTypeGuesser\\Detectors\\SniffFirstFourBytes' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/SniffFirstFourBytes.php',
53
- 'ImageMimeTypeGuesser\\Detectors\\Stack' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/Detectors/Stack.php',
54
- 'ImageMimeTypeGuesser\\GuessFromExtension' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/GuessFromExtension.php',
55
- 'ImageMimeTypeGuesser\\ImageMimeTypeGuesser' => __DIR__ . '/..' . '/rosell-dk/image-mime-type-guesser/src/ImageMimeTypeGuesser.php',
56
- 'WebPConvertCloudService\\AccessCheck' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/AccessCheck.php',
57
- 'WebPConvertCloudService\\Serve' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/Serve.php',
58
- 'WebPConvertCloudService\\WebPConvertCloudService' => __DIR__ . '/..' . '/rosell-dk/webp-convert-cloud-service/src/WebPConvertCloudService.php',
59
- 'WebPConvert\\Convert\\ConverterFactory' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/ConverterFactory.php',
60
- 'WebPConvert\\Convert\\Converters\\AbstractConverter' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php',
61
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\AutoQualityTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/AutoQualityTrait.php',
62
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\DestinationPreparationTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/DestinationPreparationTrait.php',
63
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\LoggerTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/LoggerTrait.php',
64
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\OptionsTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/OptionsTrait.php',
65
- 'WebPConvert\\Convert\\Converters\\BaseTraits\\WarningLoggerTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php',
66
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CloudConverterTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CloudConverterTrait.php',
67
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\CurlTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/CurlTrait.php',
68
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\EncodingAutoTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php',
69
- 'WebPConvert\\Convert\\Converters\\ConverterTraits\\ExecTrait' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/ExecTrait.php',
70
- 'WebPConvert\\Convert\\Converters\\Cwebp' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php',
71
- 'WebPConvert\\Convert\\Converters\\Ewww' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Ewww.php',
72
- 'WebPConvert\\Convert\\Converters\\Gd' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Gd.php',
73
- 'WebPConvert\\Convert\\Converters\\Gmagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Gmagick.php',
74
- 'WebPConvert\\Convert\\Converters\\GmagickBinary' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/GmagickBinary.php',
75
- 'WebPConvert\\Convert\\Converters\\GraphicsMagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/GraphicsMagick.php',
76
- 'WebPConvert\\Convert\\Converters\\ImageMagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ImageMagick.php',
77
- 'WebPConvert\\Convert\\Converters\\Imagick' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Imagick.php',
78
- 'WebPConvert\\Convert\\Converters\\ImagickBinary' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/ImagickBinary.php',
79
- 'WebPConvert\\Convert\\Converters\\Stack' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Stack.php',
80
- 'WebPConvert\\Convert\\Converters\\Vips' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Vips.php',
81
- 'WebPConvert\\Convert\\Converters\\Wpc' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Converters/Wpc.php',
82
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailedException.php',
83
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConversionSkippedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConversionSkippedException.php',
84
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperationalException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperationalException.php',
85
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\InvalidApiKeyException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/InvalidApiKeyException.php',
86
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\ConverterNotOperational\\SystemRequirementsNotMetException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/ConverterNotOperational/SystemRequirementsNotMetException.php',
87
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblemsException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblemsException.php',
88
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFileException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFileException.php',
89
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\FileSystemProblems\\CreateDestinationFolderException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/FileSystemProblems/CreateDestinationFolderException.php',
90
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInputException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInputException.php',
91
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\ConverterNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/ConverterNotFoundException.php',
92
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\InvalidImageTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/InvalidImageTypeException.php',
93
- 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInput\\TargetNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/TargetNotFoundException.php',
94
- 'WebPConvert\\Convert\\Helpers\\JpegQualityDetector' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Helpers/JpegQualityDetector.php',
95
- 'WebPConvert\\Convert\\Helpers\\PhpIniSizes' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Convert/Helpers/PhpIniSizes.php',
96
- 'WebPConvert\\Exceptions\\InvalidInputException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInputException.php',
97
- 'WebPConvert\\Exceptions\\InvalidInput\\InvalidImageTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/InvalidImageTypeException.php',
98
- 'WebPConvert\\Exceptions\\InvalidInput\\TargetNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/InvalidInput/TargetNotFoundException.php',
99
- 'WebPConvert\\Exceptions\\WebPConvertException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Exceptions/WebPConvertException.php',
100
- 'WebPConvert\\Helpers\\InputValidator' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/InputValidator.php',
101
- 'WebPConvert\\Helpers\\MimeType' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/MimeType.php',
102
- 'WebPConvert\\Helpers\\PathChecker' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/PathChecker.php',
103
- 'WebPConvert\\Helpers\\Sanitize' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Helpers/Sanitize.php',
104
- 'WebPConvert\\Loggers\\BaseLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/BaseLogger.php',
105
- 'WebPConvert\\Loggers\\BufferLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/BufferLogger.php',
106
- 'WebPConvert\\Loggers\\EchoLogger' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Loggers/EchoLogger.php',
107
- 'WebPConvert\\Options\\ArrayOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/ArrayOption.php',
108
- 'WebPConvert\\Options\\BooleanOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/BooleanOption.php',
109
- 'WebPConvert\\Options\\Exceptions\\InvalidOptionTypeException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionTypeException.php',
110
- 'WebPConvert\\Options\\Exceptions\\InvalidOptionValueException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/InvalidOptionValueException.php',
111
- 'WebPConvert\\Options\\Exceptions\\OptionNotFoundException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Exceptions/OptionNotFoundException.php',
112
- 'WebPConvert\\Options\\GhostOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/GhostOption.php',
113
- 'WebPConvert\\Options\\IntegerOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/IntegerOption.php',
114
- 'WebPConvert\\Options\\IntegerOrNullOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/IntegerOrNullOption.php',
115
- 'WebPConvert\\Options\\MetadataOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/MetadataOption.php',
116
- 'WebPConvert\\Options\\Option' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Option.php',
117
- 'WebPConvert\\Options\\Options' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/Options.php',
118
- 'WebPConvert\\Options\\QualityOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/QualityOption.php',
119
- 'WebPConvert\\Options\\SensitiveArrayOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/SensitiveArrayOption.php',
120
- 'WebPConvert\\Options\\SensitiveStringOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/SensitiveStringOption.php',
121
- 'WebPConvert\\Options\\StringOption' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Options/StringOption.php',
122
- 'WebPConvert\\Serve\\Exceptions\\ServeFailedException' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Exceptions/ServeFailedException.php',
123
- 'WebPConvert\\Serve\\Header' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Header.php',
124
- 'WebPConvert\\Serve\\Report' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/Report.php',
125
- 'WebPConvert\\Serve\\ServeConvertedWebP' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php',
126
- 'WebPConvert\\Serve\\ServeConvertedWebPWithErrorHandling' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeConvertedWebPWithErrorHandling.php',
127
- 'WebPConvert\\Serve\\ServeFile' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/Serve/ServeFile.php',
128
- 'WebPConvert\\WebPConvert' => __DIR__ . '/..' . '/rosell-dk/webp-convert/src/WebPConvert.php',
129
- );
130
-
131
  public static function getInitializer(ClassLoader $loader)
132
  {
133
  return \Closure::bind(function () use ($loader) {
134
  $loader->prefixLengthsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixLengthsPsr4;
135
  $loader->prefixDirsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixDirsPsr4;
136
- $loader->classMap = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$classMap;
137
 
138
  }, null, ClassLoader::class);
139
  }
41
  ),
42
  );
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
  $loader->prefixLengthsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixLengthsPsr4;
48
  $loader->prefixDirsPsr4 = ComposerStaticInit16597e36dd1bfcd787ed5a8e6d908243::$prefixDirsPsr4;
 
49
 
50
  }, null, ClassLoader::class);
51
  }
vendor/composer/installed.json CHANGED
@@ -115,17 +115,17 @@
115
  },
116
  {
117
  "name": "rosell-dk/webp-convert",
118
- "version": "2.2.2",
119
- "version_normalized": "2.2.2.0",
120
  "source": {
121
  "type": "git",
122
  "url": "https://github.com/rosell-dk/webp-convert.git",
123
- "reference": "1c3f7f228dfa1fc066ef90957c91f4b99f44dd45"
124
  },
125
  "dist": {
126
  "type": "zip",
127
- "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/1c3f7f228dfa1fc066ef90957c91f4b99f44dd45",
128
- "reference": "1c3f7f228dfa1fc066ef90957c91f4b99f44dd45",
129
  "shasum": ""
130
  },
131
  "require": {
@@ -143,7 +143,7 @@
143
  "ext-vips": "to use Vips extension for converting.",
144
  "php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
145
  },
146
- "time": "2019-09-27T10:34:05+00:00",
147
  "type": "library",
148
  "extra": {
149
  "scripts-descriptions": {
115
  },
116
  {
117
  "name": "rosell-dk/webp-convert",
118
+ "version": "2.3.0",
119
+ "version_normalized": "2.3.0.0",
120
  "source": {
121
  "type": "git",
122
  "url": "https://github.com/rosell-dk/webp-convert.git",
123
+ "reference": "74991497d403c07de269623850722aa0f7d15542"
124
  },
125
  "dist": {
126
  "type": "zip",
127
+ "url": "https://api.github.com/repos/rosell-dk/webp-convert/zipball/74991497d403c07de269623850722aa0f7d15542",
128
+ "reference": "74991497d403c07de269623850722aa0f7d15542",
129
  "shasum": ""
130
  },
131
  "require": {
143
  "ext-vips": "to use Vips extension for converting.",
144
  "php-stan/php-stan": "Suggested for dev, in order to analyse code before committing"
145
  },
146
+ "time": "2019-10-05T18:32:17+00:00",
147
  "type": "library",
148
  "extra": {
149
  "scripts-descriptions": {
vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php CHANGED
@@ -117,7 +117,7 @@ abstract class AbstractConverter
117
  $this->setProvidedOptions($options);
118
 
119
  if (!isset($this->options['_skip_input_check'])) {
120
- $this->log('WebP Convert 2.2.2', 'italic');
121
  $this->logLn(' ignited.');
122
  $this->logLn('- PHP version: ' . phpversion());
123
  if (isset($_SERVER['SERVER_SOFTWARE'])) {
117
  $this->setProvidedOptions($options);
118
 
119
  if (!isset($this->options['_skip_input_check'])) {
120
+ $this->log('WebP Convert 2.3.0', 'italic');
121
  $this->logLn(' ignited.');
122
  $this->logLn('- PHP version: ' . phpversion());
123
  if (isset($_SERVER['SERVER_SOFTWARE'])) {
vendor/rosell-dk/webp-convert/src/Convert/Converters/BaseTraits/WarningLoggerTrait.php CHANGED
@@ -19,6 +19,12 @@ trait WarningLoggerTrait
19
  /** @var string|array|null Previous error handler (stored in order to be able pass warnings on) */
20
  private $previousErrorHandler;
21
 
 
 
 
 
 
 
22
  /**
23
  * Handle warnings and notices during conversion by logging them and passing them on.
24
  *
@@ -30,7 +36,7 @@ trait WarningLoggerTrait
30
  * @param string $errfile
31
  * @param integer $errline
32
  *
33
- * @return false|null
34
  */
35
  public function warningHandler($errno, $errstr, $errfile, $errline)
36
  {
@@ -59,9 +65,13 @@ trait WarningLoggerTrait
59
 
60
  If it was possible to suppress the warnings with @ without suppressing warnings on systems
61
  with error reporting set to E_NONE, I would do that.
62
-
63
  */
64
 
 
 
 
 
 
65
  $errorTypes = [
66
  E_WARNING => "Warning",
67
  E_NOTICE => "Notice",
@@ -119,6 +129,8 @@ trait WarningLoggerTrait
119
  */
120
  protected function activateWarningLogger()
121
  {
 
 
122
  $this->previousErrorHandler = set_error_handler(
123
  array($this, "warningHandler"),
124
  E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE
@@ -136,4 +148,24 @@ trait WarningLoggerTrait
136
  {
137
  restore_error_handler();
138
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  }
19
  /** @var string|array|null Previous error handler (stored in order to be able pass warnings on) */
20
  private $previousErrorHandler;
21
 
22
+ /** @var boolean Suppress ALL warnings? (both from log and from bubbling up) */
23
+ private $suppressWarnings;
24
+
25
+ /** @var int Count number of warnings */
26
+ private $warningCounter;
27
+
28
  /**
29
  * Handle warnings and notices during conversion by logging them and passing them on.
30
  *
36
  * @param string $errfile
37
  * @param integer $errline
38
  *
39
+ * @return false|null|void
40
  */
41
  public function warningHandler($errno, $errstr, $errfile, $errline)
42
  {
65
 
66
  If it was possible to suppress the warnings with @ without suppressing warnings on systems
67
  with error reporting set to E_NONE, I would do that.
 
68
  */
69
 
70
+ $this->warningCounter++;
71
+ if ($this->suppressWarnings) {
72
+ return;
73
+ }
74
+
75
  $errorTypes = [
76
  E_WARNING => "Warning",
77
  E_NOTICE => "Notice",
129
  */
130
  protected function activateWarningLogger()
131
  {
132
+ $this->suppressWarnings = false;
133
+ $this->warningCounter = 0;
134
  $this->previousErrorHandler = set_error_handler(
135
  array($this, "warningHandler"),
136
  E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE
148
  {
149
  restore_error_handler();
150
  }
151
+
152
+ protected function disableWarningsTemporarily()
153
+ {
154
+ $this->suppressWarnings = true;
155
+ }
156
+
157
+ protected function reenableWarnings()
158
+ {
159
+ $this->suppressWarnings = false;
160
+ }
161
+
162
+ protected function getWarningCount()
163
+ {
164
+ return $this->warningCounter;
165
+ }
166
+
167
+ protected function resetWarningCount()
168
+ {
169
+ $this->warningCounter = 0;
170
+ }
171
  }
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.0-fbsd → cwebp-060-fbsd} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.0-solaris → cwebp-060-solaris} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-0.6.1-linux-x86-64 → cwebp-061-linux-x86-64} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-linux-x86-64 → cwebp-103-linux-x86-64} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-linux-x86-64-static → cwebp-103-linux-x86-64-static} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-mac-10.14 → cwebp-103-mac-10_14} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Binaries/{cwebp-1.0.3-windows-x64.exe → cwebp-103-windows-x64.exe} RENAMED
File without changes
vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php CHANGED
@@ -3,11 +3,13 @@
3
  namespace WebPConvert\Convert\Converters;
4
 
5
  use WebPConvert\Convert\Converters\AbstractConverter;
 
6
  use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
7
  use WebPConvert\Convert\Converters\ConverterTraits\ExecTrait;
8
  use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
9
  use WebPConvert\Convert\Exceptions\ConversionFailedException;
10
  use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperationalException;
 
11
  use WebPConvert\Options\BooleanOption;
12
  use WebPConvert\Options\SensitiveStringOption;
13
  use WebPConvert\Options\StringOption;
@@ -39,51 +41,46 @@ class Cwebp extends AbstractConverter
39
  new SensitiveStringOption('rel-path-to-precompiled-binaries', './Binaries'),
40
  new BooleanOption('try-cwebp', true),
41
  new BooleanOption('try-common-system-paths', true),
 
42
  new BooleanOption('try-supplied-binary-for-os', true)
43
  );
44
  }
45
 
46
- // System paths to look for cwebp binary
47
- private static $cwebpDefaultPaths = [
48
- //'cwebp',
49
- '/usr/bin/cwebp',
50
- '/usr/local/bin/cwebp',
51
- '/usr/gnu/bin/cwebp',
52
- '/usr/syno/bin/cwebp'
53
- ];
54
-
55
  // OS-specific binaries included in this library, along with hashes
56
  // If other binaries are going to be added, notice that the first argument is what PHP_OS returns.
57
  // (possible values, see here: https://stackoverflow.com/questions/738823/possible-values-for-php-os)
58
  // Got the precompiled binaries here: https://developers.google.com/speed/webp/docs/precompiled
 
 
 
59
  private static $suppliedBinariesInfo = [
60
  'WINNT' => [
61
- ['cwebp-1.0.3-windows-x64.exe', 'b3aaab03ca587e887f11f6ae612293d034ee04f4f7f6bc7a175321bb47a10169'],
62
  ],
63
  'Darwin' => [
64
- ['cwebp-1.0.3-mac-10.14', '7332ed5f0d4091e2379b1eaa32a764f8c0d51b7926996a1dc8b4ef4e3c441a12'],
65
  ],
66
  'SunOS' => [
67
  // Got this from ewww Wordpress plugin, which unfortunately still uses the old 0.6.0 versions
68
  // Can you help me get a 1.0.3 version?
69
- ['cwebp-0.6.0-solaris', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f']
70
  ],
71
  'FreeBSD' => [
72
  // Got this from ewww Wordpress plugin, which unfortunately still uses the old 0.6.0 versions
73
  // Can you help me get a 1.0.3 version?
74
- ['cwebp-0.6.0-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573']
75
  ],
76
  'Linux' => [
77
  // Dynamically linked executable.
78
  // It seems it is slightly faster than the statically linked
79
- ['cwebp-1.0.3-linux-x86-64', 'a663215a46d347f63e1ca641c18527a1ae7a2c9a0ae85ca966a97477ea13dfe0'],
80
 
81
  // Statically linked executable
82
  // It may be that it on some systems works, where the dynamically linked does not (see #196)
83
- ['cwebp-1.0.3-linux-x86-64-static', 'ab96f01b49336da8b976c498528080ff614112d5985da69943b48e0cb1c5228a'],
84
 
85
  // Old executable for systems in case both of the above fails
86
- ['cwebp-0.6.1-linux-x86-64', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568'],
87
  ]
88
  ];
89
 
@@ -108,7 +105,11 @@ class Cwebp extends AbstractConverter
108
  $this->checkOperationalityExecTrait();
109
 
110
  $options = $this->options;
111
- if (!$options['try-supplied-binary-for-os'] && !$options['try-common-system-paths'] && !$options['try-cwebp']) {
 
 
 
 
112
  throw new ConverterNotOperationalException(
113
  'Configured to neither try pure cwebp command, ' .
114
  'nor look for cweb binaries in common system locations and ' .
@@ -395,7 +396,6 @@ class Cwebp extends AbstractConverter
395
  }
396
  $result[] = $binaryFile;
397
  }
398
-
399
  return $result;
400
  }
401
 
@@ -468,52 +468,94 @@ class Cwebp extends AbstractConverter
468
  return ['detected' => $binariesWithVersions, 'failed' => $binariesWithFailCodes];
469
  }
470
 
471
- /**
472
- * Detect versions of all cwebps that are of relevance (according to configuration).
473
- *
474
- * @return array the "detected" key holds working binaries and their version numbers, the
475
- * the "failed" key holds failed binaries and their error codes.
476
- */
477
- private function getCwebpVersions()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  {
479
- // TODO: Check out if exec('whereis cwebp'); would be a good idea
 
 
 
480
 
481
  if (defined('WEBPCONVERT_CWEBP_PATH')) {
482
  $this->logLn('WEBPCONVERT_CWEBP_PATH was defined, so using that path and ignoring any other');
483
- return $this->detectVersions([constant('WEBPCONVERT_CWEBP_PATH')]);
484
  }
485
  if (!empty(getenv('WEBPCONVERT_CWEBP_PATH'))) {
486
  $this->logLn(
487
  'WEBPCONVERT_CWEBP_PATH environment variable was set, so using that path and ignoring any other'
488
  );
489
- return $this->detectVersions([getenv('WEBPCONVERT_CWEBP_PATH')]);
490
  }
491
 
492
- $versions = [];
493
  if ($this->options['try-cwebp']) {
494
  $this->logLn(
495
- 'Detecting version of cwebp command (it may not be available, but we try nonetheless)'
496
  );
497
- $versions = $this->detectVersions(['cwebp']);
498
- }
499
- if ($this->options['try-common-system-paths']) {
500
- // Note:
501
- // We used to do a file_exists($binary) check.
502
- // That was not a good idea because it could trigger open_basedir errors. The open_basedir
503
- // restriction does not operate on the exec command. So note to self: Do not do that again.
 
504
  $this->logLn(
505
- 'Detecting versions of the cwebp binaries in common system paths ' .
506
- '(some may not be found, that is to be expected)'
507
  );
508
- $versions = array_merge_recursive($versions, $this->detectVersions(self::$cwebpDefaultPaths));
509
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  if ($this->options['try-supplied-binary-for-os']) {
511
- $versions = array_merge_recursive(
512
- $versions,
513
- $this->detectVersions($this->getSuppliedBinaryPathForOS())
514
- );
515
  }
516
- return $versions;
 
517
  }
518
 
519
  /**
@@ -552,7 +594,7 @@ class Cwebp extends AbstractConverter
552
  /**
553
  * Helper for composing an error message when no converters are working.
554
  *
555
- * @param array $versions The array which we get from calling ::getCwebpVersions()
556
  * @return string An informative and to the point error message.
557
  */
558
  private function composeMeaningfullErrorMessageNoVersionsWorking($versions)
@@ -593,7 +635,38 @@ class Cwebp extends AbstractConverter
593
 
594
  protected function doActualConvert()
595
  {
596
- $versions = $this->getCwebpVersions();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  $binaryVersions = $versions['detected'];
598
  if (count($binaryVersions) == 0) {
599
  // No working cwebp binaries found.
@@ -606,7 +679,7 @@ class Cwebp extends AbstractConverter
606
  // Sort binaries so those with highest numbers comes first
607
  arsort($binaryVersions);
608
  $this->logLn(
609
- 'Here is what we found, ordered by version number.'
610
  );
611
  foreach ($binaryVersions as $binary => $version) {
612
  $this->logLn('- ' . $binary . ': (version: ' . $version .')');
3
  namespace WebPConvert\Convert\Converters;
4
 
5
  use WebPConvert\Convert\Converters\AbstractConverter;
6
+ use WebPConvert\Convert\Converters\BaseTraits\WarningLoggerTrait;
7
  use WebPConvert\Convert\Converters\ConverterTraits\EncodingAutoTrait;
8
  use WebPConvert\Convert\Converters\ConverterTraits\ExecTrait;
9
  use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperational\SystemRequirementsNotMetException;
10
  use WebPConvert\Convert\Exceptions\ConversionFailedException;
11
  use WebPConvert\Convert\Exceptions\ConversionFailed\ConverterNotOperationalException;
12
+ use WebPConvert\Helpers\BinaryDiscovery;
13
  use WebPConvert\Options\BooleanOption;
14
  use WebPConvert\Options\SensitiveStringOption;
15
  use WebPConvert\Options\StringOption;
41
  new SensitiveStringOption('rel-path-to-precompiled-binaries', './Binaries'),
42
  new BooleanOption('try-cwebp', true),
43
  new BooleanOption('try-common-system-paths', true),
44
+ new BooleanOption('try-discovering-cwebp', true),
45
  new BooleanOption('try-supplied-binary-for-os', true)
46
  );
47
  }
48
 
 
 
 
 
 
 
 
 
 
49
  // OS-specific binaries included in this library, along with hashes
50
  // If other binaries are going to be added, notice that the first argument is what PHP_OS returns.
51
  // (possible values, see here: https://stackoverflow.com/questions/738823/possible-values-for-php-os)
52
  // Got the precompiled binaries here: https://developers.google.com/speed/webp/docs/precompiled
53
+ // Note when changing binaries:
54
+ // 1: Do NOT use "." in filename. It causes unzipping to fail on some hosts
55
+ // 2: Set permission to 775. 755 causes unzipping to fail on some hosts
56
  private static $suppliedBinariesInfo = [
57
  'WINNT' => [
58
+ ['cwebp-103-windows-x64.exe', 'b3aaab03ca587e887f11f6ae612293d034ee04f4f7f6bc7a175321bb47a10169'],
59
  ],
60
  'Darwin' => [
61
+ ['cwebp-103-mac-10_14', '7332ed5f0d4091e2379b1eaa32a764f8c0d51b7926996a1dc8b4ef4e3c441a12'],
62
  ],
63
  'SunOS' => [
64
  // Got this from ewww Wordpress plugin, which unfortunately still uses the old 0.6.0 versions
65
  // Can you help me get a 1.0.3 version?
66
+ ['cwebp-060-solaris', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f']
67
  ],
68
  'FreeBSD' => [
69
  // Got this from ewww Wordpress plugin, which unfortunately still uses the old 0.6.0 versions
70
  // Can you help me get a 1.0.3 version?
71
+ ['cwebp-060-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573']
72
  ],
73
  'Linux' => [
74
  // Dynamically linked executable.
75
  // It seems it is slightly faster than the statically linked
76
+ ['cwebp-103-linux-x86-64', 'a663215a46d347f63e1ca641c18527a1ae7a2c9a0ae85ca966a97477ea13dfe0'],
77
 
78
  // Statically linked executable
79
  // It may be that it on some systems works, where the dynamically linked does not (see #196)
80
+ ['cwebp-103-linux-x86-64-static', 'ab96f01b49336da8b976c498528080ff614112d5985da69943b48e0cb1c5228a'],
81
 
82
  // Old executable for systems in case both of the above fails
83
+ ['cwebp-061-linux-x86-64', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568'],
84
  ]
85
  ];
86
 
105
  $this->checkOperationalityExecTrait();
106
 
107
  $options = $this->options;
108
+ if (!$options['try-supplied-binary-for-os'] &&
109
+ !$options['try-common-system-paths'] &&
110
+ !$options['try-cwebp'] &&
111
+ !$options['try-discovering-cwebp']
112
+ ) {
113
  throw new ConverterNotOperationalException(
114
  'Configured to neither try pure cwebp command, ' .
115
  'nor look for cweb binaries in common system locations and ' .
396
  }
397
  $result[] = $binaryFile;
398
  }
 
399
  return $result;
400
  }
401
 
468
  return ['detected' => $binariesWithVersions, 'failed' => $binariesWithFailCodes];
469
  }
470
 
471
+ private function logBinariesFound($binaries)
472
+ {
473
+ if (count($binaries) == 0) {
474
+ $this->logLn('Found 0 binaries');
475
+ } else {
476
+ $this->logLn('Found ' . count($binaries) . ' binaries: ');
477
+ foreach ($binaries as $binary) {
478
+ $this->logLn('- ' . $binary);
479
+ }
480
+ }
481
+ }
482
+
483
+ private function logDiscoverAction($optionName, $description)
484
+ {
485
+ if ($this->options[$optionName]) {
486
+ $this->logLn(
487
+ 'Discovering binaries ' . $description . ' ' .
488
+ '(to skip this step, disable the "' . $optionName . '" option)'
489
+ );
490
+ } else {
491
+ $this->logLn(
492
+ 'Skipped discovering binaries ' . $description . ' ' .
493
+ '(enable "' . $optionName . '" if you do not want to skip that step)'
494
+ );
495
+ }
496
+ }
497
+
498
+ private function discoverCwebpBinaries()
499
  {
500
+ $this->logLn(
501
+ 'Looking for cwebp binaries.'
502
+ );
503
+ $binaries = [];
504
 
505
  if (defined('WEBPCONVERT_CWEBP_PATH')) {
506
  $this->logLn('WEBPCONVERT_CWEBP_PATH was defined, so using that path and ignoring any other');
507
+ return [constant('WEBPCONVERT_CWEBP_PATH')];
508
  }
509
  if (!empty(getenv('WEBPCONVERT_CWEBP_PATH'))) {
510
  $this->logLn(
511
  'WEBPCONVERT_CWEBP_PATH environment variable was set, so using that path and ignoring any other'
512
  );
513
+ return [getenv('WEBPCONVERT_CWEBP_PATH')];
514
  }
515
 
 
516
  if ($this->options['try-cwebp']) {
517
  $this->logLn(
518
+ 'Discovering if a plain cwebp call works (to skip this step, disable the "try-cwebp" option)'
519
  );
520
+ $result = $this->detectVersion('cwebp');
521
+ if (gettype($result) == 'string') {
522
+ $this->logLn('We could get the version, so yes, a plain cwebp call works');
523
+ $binaries[] = 'cwebp';
524
+ } else {
525
+ $this->logLn('Nope a plain cwebp call does not work');
526
+ }
527
+ } else {
528
  $this->logLn(
529
+ 'Skipped discovering if a plain cwebp call works' .
530
+ ' (enable the "try-cwebp" option if you do not want to skip that step)'
531
  );
 
532
  }
533
+
534
+ // try-discovering-cwebp
535
+ $this->logDiscoverAction('try-discovering-cwebp', 'using "which -a cwebp" command.');
536
+ if ($this->options['try-discovering-cwebp']) {
537
+ $moreBinaries = BinaryDiscovery::discoverInstalledBinaries('cwebp');
538
+ $this->logBinariesFound($moreBinaries);
539
+ $binaries = array_merge($binaries, $moreBinaries);
540
+ }
541
+
542
+ // 'try-common-system-paths'
543
+ $this->logDiscoverAction('try-common-system-paths', 'by peeking in common system paths');
544
+ if ($this->options['try-common-system-paths']) {
545
+ $moreBinaries = BinaryDiscovery::discoverInCommonSystemPaths('cwebp');
546
+ $this->logBinariesFound($moreBinaries);
547
+ $binaries = array_merge($binaries, $moreBinaries);
548
+ }
549
+
550
+ // try-supplied-binary-for-os
551
+ $this->logDiscoverAction('try-supplied-binary-for-os', 'which are distributed with the webp-convert library');
552
  if ($this->options['try-supplied-binary-for-os']) {
553
+ $moreBinaries = $this->getSuppliedBinaryPathForOS();
554
+ $this->logBinariesFound($moreBinaries);
555
+ $binaries = array_merge($binaries, $moreBinaries);
 
556
  }
557
+
558
+ return array_values(array_unique($binaries));
559
  }
560
 
561
  /**
594
  /**
595
  * Helper for composing an error message when no converters are working.
596
  *
597
+ * @param array $versions The array which we get from calling ::detectVersions($binaries)
598
  * @return string An informative and to the point error message.
599
  */
600
  private function composeMeaningfullErrorMessageNoVersionsWorking($versions)
635
 
636
  protected function doActualConvert()
637
  {
638
+ $binaries = $this->discoverCwebpBinaries();
639
+ if (count($binaries) == 0) {
640
+ $this->logLn('No cwebp binaries found!');
641
+
642
+ $discoverOptions = [
643
+ 'try-supplied-binary-for-os',
644
+ 'try-common-system-paths',
645
+ 'try-cwebp',
646
+ 'try-discovering-cwebp'
647
+ ];
648
+ $disabledDiscoverOptions = [];
649
+ foreach ($discoverOptions as $discoverOption) {
650
+ if (!$this->options[$discoverOption]) {
651
+ $disabledDiscoverOptions[] = $discoverOption;
652
+ }
653
+ }
654
+ if (count($disabledDiscoverOptions) == 0) {
655
+ throw new SystemRequirementsNotMetException(
656
+ 'No cwebp binaries found.'
657
+ );
658
+ } else {
659
+ throw new SystemRequirementsNotMetException(
660
+ 'No cwebp binaries found. Try enabling the "' .
661
+ implode('" option or the "', $disabledDiscoverOptions) . '" option.'
662
+ );
663
+ }
664
+ }
665
+ $this->logLn(
666
+ 'Detecting versions of the cwebp binaries found'
667
+ );
668
+ $versions = $this->detectVersions($binaries);
669
+
670
  $binaryVersions = $versions['detected'];
671
  if (count($binaryVersions) == 0) {
672
  // No working cwebp binaries found.
679
  // Sort binaries so those with highest numbers comes first
680
  arsort($binaryVersions);
681
  $this->logLn(
682
+ 'Binaries ordered by version number.'
683
  );
684
  foreach ($binaryVersions as $binary => $version) {
685
  $this->logLn('- ' . $binary . ': (version: ' . $version .')');
vendor/rosell-dk/webp-convert/src/Helpers/BinaryDiscovery.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WebPConvert\Helpers;
4
+
5
+ use WebPConvert\Helpers\FileExists;
6
+
7
+ /**
8
+ * Discover multiple paths of a binary
9
+ *
10
+ * @package WebPConvert
11
+ * @author Bjørn Rosell <it@rosell.dk>
12
+ * @since Class available since Release 2.3.0
13
+ */
14
+ class BinaryDiscovery
15
+ {
16
+
17
+ // Common system paths
18
+ private static $commonSystemPaths = [
19
+ '/usr/bin',
20
+ '/usr/local/bin',
21
+ '/usr/gnu/bin',
22
+ '/usr/syno/bin'
23
+ ];
24
+
25
+ /**
26
+ * Discover binaries by looking in common system paths.
27
+ *
28
+ * We try a small set of common system paths, such as "/usr/bin".
29
+ *
30
+ * @param string $binary the binary to look for (ie "cwebp")
31
+ *
32
+ * @return array binaries found in common system locations
33
+ */
34
+ public static function discoverInCommonSystemPaths($binary)
35
+ {
36
+ $binaries = [];
37
+ foreach (self::$commonSystemPaths as $dir) {
38
+ // PS: FileExists might throw if exec() is unavailable. We let it.
39
+ // - this class assumes exec is available
40
+ if (FileExists::fileExistsTryHarder($dir . '/' . $binary)) {
41
+ $binaries[] = $dir . '/' . $binary;
42
+ }
43
+ }
44
+ return $binaries;
45
+ }
46
+
47
+ /**
48
+ * Discover installed binaries using ie "whereis -b cwebp"
49
+ *
50
+ * @return array Array of cwebp paths discovered (possibly empty)
51
+ */
52
+ private static function discoverBinariesUsingWhereIs($binary)
53
+ {
54
+ // This method was added due to #226.
55
+ exec('whereis -b ' . $binary, $output, $returnCode);
56
+ if (($returnCode == 0) && (isset($output[0]))) {
57
+ $result = $output[0];
58
+ // Ie: "cwebp: /usr/bin/cwebp /usr/local/bin/cwebp"
59
+ if (preg_match('#^' . $binary . ':\s(.*)$#', $result, $matches)) {
60
+ return explode(' ', $matches[1]);
61
+ }
62
+ }
63
+ return [];
64
+ }
65
+
66
+ /**
67
+ * Discover installed binaries using "which -a cwebp"
68
+ *
69
+ * @param string $binary the binary to look for (ie "cwebp")
70
+ *
71
+ * @return array Array of paths discovered (possibly empty)
72
+ */
73
+ private static function discoverBinariesUsingWhich($binary)
74
+ {
75
+ // As suggested by @cantoute here:
76
+ // https://wordpress.org/support/topic/sh-1-usr-local-bin-cwebp-not-found/
77
+ exec('which -a ' . $binary, $output, $returnCode);
78
+ if ($returnCode == 0) {
79
+ return $output;
80
+ }
81
+ return [];
82
+ }
83
+
84
+ /**
85
+ * Discover binaries using "which -a" or, if that fails "whereis -b"
86
+ *
87
+ * These commands only searces within $PATH. So it only finds installed binaries (which is good,
88
+ * as it would be unsafe to deal with binaries found scattered around)
89
+ *
90
+ * @param string $binary the binary to look for (ie "cwebp")
91
+ *
92
+ * @return array binaries found in common system locations
93
+ */
94
+ public static function discoverInstalledBinaries($binary)
95
+ {
96
+ $paths = self::discoverBinariesUsingWhich($binary);
97
+ if (count($paths) > 0) {
98
+ return $paths;
99
+ }
100
+
101
+ $paths = self::discoverBinariesUsingWhereIs($binary);
102
+ if (count($paths) > 0) {
103
+ return $paths;
104
+ }
105
+ return [];
106
+ }
107
+ }
vendor/rosell-dk/webp-convert/src/Helpers/FileExists.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WebPConvert\Helpers;
4
+
5
+ /**
6
+ * A fileExist function free of deception
7
+ *
8
+ * @package WebPConvert
9
+ * @author Bjørn Rosell <it@rosell.dk>
10
+ * @since Class available since Release 2.3.0
11
+ */
12
+ class FileExists
13
+ {
14
+
15
+ private static $lastWarning;
16
+
17
+ /**
18
+ * A warning handler that registers that a warning has occured and suppresses it.
19
+ *
20
+ * The function is a callback used with "set_error_handler".
21
+ * It is declared public because it needs to be accessible from the point where the warning is triggered.
22
+ *
23
+ * @param integer $errno
24
+ * @param string $errstr
25
+ * @param string $errfile
26
+ * @param integer $errline
27
+ *
28
+ * @return void
29
+ */
30
+ public static function warningHandler($errno, $errstr, $errfile, $errline)
31
+ {
32
+ self::$lastWarning = [$errstr, $errno];
33
+
34
+ // Suppress the warning by returning void
35
+ return;
36
+ }
37
+
38
+ /**
39
+ * A well behaved replacement for file_exist that throws upon failure rather than emmitting a warning.
40
+ *
41
+ * @throws \Exception If file_exists threw a warning
42
+ * @return boolean|null True if file exists. False if it doesn't.
43
+ */
44
+ public static function honestFileExists($path)
45
+ {
46
+ // There is a challenges here:
47
+ // We want to suppress warnings, but at the same time we want to know that it happened.
48
+ // We achieve this by registering an error handler
49
+ set_error_handler(
50
+ array('WebPConvert\Helpers\FileExists', "warningHandler"),
51
+ E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE
52
+ );
53
+ self::$lastWarning = null;
54
+ $found = @file_exists($path);
55
+
56
+ // restore previous error handler immediately
57
+ restore_error_handler();
58
+
59
+ // If file_exists returns true, we can rely on there being a file there
60
+ if ($found) {
61
+ return true;
62
+ }
63
+
64
+ // file_exists returned false.
65
+ // this result is only trustworthy if no warning was emitted.
66
+ if (is_null(self::$lastWarning)) {
67
+ return false;
68
+ }
69
+
70
+ list($errstr, $errno) = self::$lastWarning;
71
+ throw new \Exception($errstr, $errno);
72
+ }
73
+
74
+ /**
75
+ * A fileExist based on an exec call.
76
+ *
77
+ * @throws \Exception If exec cannot be called
78
+ * @return boolean|null True if file exists. False if it doesn't.
79
+ */
80
+ public static function fileExistsUsingExec($path)
81
+ {
82
+ if (!function_exists('exec')) {
83
+ throw new \Exception(
84
+ 'cannot determine if file exists using exec() - the function is unavailable'
85
+ );
86
+ }
87
+
88
+ // Lets try to find out by executing "ls path/to/cwebp"
89
+ exec('ls ' . $path, $output, $returnCode);
90
+ if (($returnCode == 0) && (isset($output[0]))) {
91
+ return true;
92
+ }
93
+
94
+ // We assume that "ls" command is general available!
95
+ // As that failed, we can conclude the file does not exist.
96
+ return false;
97
+ }
98
+
99
+ /**
100
+ * A fileExist doing the best it can.
101
+ *
102
+ * @throws \Exception If it cannot be determined if the file exists
103
+ * @return boolean|null True if file exists. False if it doesn't.
104
+ */
105
+ public static function fileExistsTryHarder($path)
106
+ {
107
+ try {
108
+ $result = self::honestFileExists($path);
109
+ } catch (\Exception $e) {
110
+ try {
111
+ $result = self::fileExistsUsingExec($path);
112
+ } catch (\Exception $e) {
113
+ throw new \Exception('Cannot determine if file exists or not');
114
+ }
115
+ }
116
+ return $result;
117
+ }
118
+ }
vendor/rosell-dk/webp-convert/src/Helpers/MimeType.php CHANGED
@@ -34,7 +34,7 @@ class MimeType
34
  if (isset(self::$cachedDetections[$absFilePath])) {
35
  return self::$cachedDetections[$absFilePath];
36
  }
37
- $cachedDetections[$absFilePath] = ImageMimeTypeGuesser::lenientGuess($absFilePath);
38
- return $cachedDetections[$absFilePath];
39
  }
40
  }
34
  if (isset(self::$cachedDetections[$absFilePath])) {
35
  return self::$cachedDetections[$absFilePath];
36
  }
37
+ self::$cachedDetections[$absFilePath] = ImageMimeTypeGuesser::lenientGuess($absFilePath);
38
+ return self::$cachedDetections[$absFilePath];
39
  }
40
  }
vendor/rosell-dk/webp-convert/src/Serve/ServeConvertedWebP.php CHANGED
@@ -50,7 +50,6 @@ class ServeConvertedWebP
50
  new BooleanOption('show-report', false),
51
  new BooleanOption('suppress-warnings', true),
52
  new BooleanOption('redirect-to-self-instead-of-serving', false),
53
- //new BooleanOption('redirect-to-self-instead-of-serving-destination', false),
54
  new ArrayOption('serve-image', []),
55
  new SensitiveArrayOption('convert', [])
56
  );
@@ -183,8 +182,12 @@ class ServeConvertedWebP
183
  }
184
 
185
  if ($options['redirect-to-self-instead-of-serving']) {
186
- Header::addLogHeader('Redirecting to self! (hope you got redirection to existing webps set up, otherwise you will get a loop!)', $serveLogger);
187
- header('Location: ?fresh' , 302);
 
 
 
 
188
  return;
189
  }
190
 
@@ -197,14 +200,7 @@ class ServeConvertedWebP
197
  self::serveOriginal($source, $options['serve-image']);
198
  }
199
 
200
- /*if ($options['redirect-to-self-instead-of-serving-destination']) {
201
- Header::addLogHeader('Redirecting to self! (hope you got redirection to existing webps set up, otherwise you will get a loop!)', $serveLogger);
202
- header('Location: ?fresh' , 302);
203
- } else {*/
204
- Header::addLogHeader('Serving converted file', $serveLogger);
205
- self::serveDestination($destination, $options['serve-image']);
206
- //}
207
-
208
-
209
  }
210
  }
50
  new BooleanOption('show-report', false),
51
  new BooleanOption('suppress-warnings', true),
52
  new BooleanOption('redirect-to-self-instead-of-serving', false),
 
53
  new ArrayOption('serve-image', []),
54
  new SensitiveArrayOption('convert', [])
55
  );
182
  }
183
 
184
  if ($options['redirect-to-self-instead-of-serving']) {
185
+ Header::addLogHeader(
186
+ 'Redirecting to self! ' .
187
+ '(hope you got redirection to existing webps set up, otherwise you will get a loop!)',
188
+ $serveLogger
189
+ );
190
+ header('Location: ?fresh', 302);
191
  return;
192
  }
193
 
200
  self::serveOriginal($source, $options['serve-image']);
201
  }
202
 
203
+ Header::addLogHeader('Serving converted file', $serveLogger);
204
+ self::serveDestination($destination, $options['serve-image']);
 
 
 
 
 
 
 
205
  }
206
  }
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.17.1
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.17.2
7
  * Author: Bjørn Rosell
8
  * Author URI: https://www.bitwise-it.dk
9
  * License: GPL2