Changeset 3439201
- Timestamp:
- 01/14/2026 06:51:37 AM (5 weeks ago)
- Location:
- webp-express
- Files:
-
- 2 added
- 20 edited
- 1 copied
-
tags/0.25.14 (copied) (copied from webp-express/trunk)
-
tags/0.25.14/README.md (modified) (2 diffs)
-
tags/0.25.14/README.txt (modified) (6 diffs)
-
tags/0.25.14/docs/publishing.md (modified) (1 diff)
-
tags/0.25.14/lib/classes/CachePurge.php (modified) (4 diffs)
-
tags/0.25.14/lib/classes/ConvertHelperIndependent.php (modified) (1 diff)
-
tags/0.25.14/lib/classes/MediaLibraryHelper.php (added)
-
tags/0.25.14/lib/classes/WodConfigLoader.php (modified) (4 diffs)
-
tags/0.25.14/lib/dismissable-global-messages/0.25.10/renamed-config-file.php (modified) (2 diffs)
-
tags/0.25.14/lib/dismissable-global-messages/0.25.11/updated-htaccess.php (modified) (2 diffs)
-
tags/0.25.14/lib/dismissable-global-messages/0.25.12/nginx-rewrites-needs-updating.php (modified) (2 diffs)
-
tags/0.25.14/webp-express.php (modified) (2 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/README.txt (modified) (6 diffs)
-
trunk/docs/publishing.md (modified) (1 diff)
-
trunk/lib/classes/CachePurge.php (modified) (4 diffs)
-
trunk/lib/classes/ConvertHelperIndependent.php (modified) (1 diff)
-
trunk/lib/classes/MediaLibraryHelper.php (added)
-
trunk/lib/classes/WodConfigLoader.php (modified) (4 diffs)
-
trunk/lib/dismissable-global-messages/0.25.10/renamed-config-file.php (modified) (2 diffs)
-
trunk/lib/dismissable-global-messages/0.25.11/updated-htaccess.php (modified) (2 diffs)
-
trunk/lib/dismissable-global-messages/0.25.12/nginx-rewrites-needs-updating.php (modified) (2 diffs)
-
trunk/webp-express.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webp-express/tags/0.25.14/README.md
r3425690 r3439201 727 727 I generally create a pre-release before publishing. If you [follow me on ko-fi](https://ko-fi.com/rosell), you will get notified when a pre-release is available. I generally create a pre-release on fridays and mark it as stable on mondays. In order to download a pre-release, go to [the advanced page](https://wordpress.org/plugins/webp-express/advanced/) and scroll down to "Please select a specific version to download". I don't name the pre-releases different. You will just see the next version here before it is available the usual way. 728 728 729 ## Changes in 0.21.1730 *(released: 27 Oct 2021)*731 * Bugfix: File manager could not handle many images. It now loads tree branches on need basis instead of the complete tree in one go732 * Bugfix: For mulisite, the redirect after settings save was not working (bug introduced in 0.21.0)733 734 For more info, see the closed issues on the [webp-express 0.21.1 milestone](https://github.com/rosell-dk/webp-express/milestone/42?closed=1)735 736 ## Changes in 0.21.0737 *(released: 25 Oct 2021)*738 * Added image browser (in Media tab)739 * Updated webp convert library to 2.7.0.740 * ImageMagick now supports the "near-lossless" option (provided Imagick >= 7.0.10-54)741 * Added "try-common-system-paths" option for ImageMagick (default: true). Thanks to Henrik Alves for adding this option.742 * Bugfix: Handling Uncaught Fatal Exception during .htaccess read failure. Thanks to Manuel D'Orso from Italy for the fix.743 * Bugfix: File names which were not UTF8 caused trouble in the Bulk Convert. Thank to "mills4078" for the fix744 * Bugfix: Redirection back to settings after saving settings failed on some systems. Thanks to Martin Rehberger (@kingkero) from Germany for the fix.745 * Bugfix: Webp urls did not contain port number (only relevant when the website was not on default port number). Thanks to Nicolas LIENART (@nicolnt) from France for providing the fix.746 747 For more info, see the closed issues on the [webp-express 0.21.0 milestone](https://github.com/rosell-dk/webp-express/milestone/41?closed=1) and the748 [webp-convert 2.7.0 milestone](https://github.com/rosell-dk/webp-convert/milestone/24?closed=1)749 750 751 ## Changes in 0.20.1752 *(released: 20 Jun 2021)*753 * Bugfix: Removed composer.lock. It was locked on PHP 7.2, which caused server error on some sites.754 755 ## Changes in 0.20.0756 *(released: 17 Jun 2021)*757 * Added WP CLI support. Add "wp webp-express convert" to crontab for nightly conversions of new images! Thanks to Isuru Sampath Ratnayake from Sri Lanka for initializing this.758 * Added "sharp-yuv" (not as option, but as always on). Better YUV->RGB color conversion at almost no price. [Read more here](https://www.ctrl.blog/entry/webp-sharp-yuv.html). Supported by cwebp, vips, gmagick, graphicsmagick, imagick and imagemagick759 * Bumped cwebp binaries to 1.2.0760 * cwebp now only validates hash of supplied precompiled binaries when necessary. This cuts down conversion time.761 * Convert on upload now defaults to false, as it may impact upload experience in themes with many formats.762 * bugfix: Alpha quality was saved incorrectly for PNG. Thanks to Chriss Gibbs from the UK for finding and fixing this.763 * bugfix: wp-debug log could be flooded with "Undefined index: HTTP_ACCEPT". Thanks to @markusreis for finding and fixing this.764 765 ## Changes in 0.19.0766 *(released: 13 Nov 2020)*767 * New convertion method: ffmpeg768 * Fixed problem in Bulk Convert when files had special characters in their filename769 * Prevented problems if the plugin gets included twice (can anybody enlighten me on how this might happen?)770 771 For more info, see the closed issues on the [0.19.0 milestone on the github repository](https://github.com/rosell-dk/webp-express/milestone/36?closed=1)772 773 ## Changes in 0.18.3774 *(released: 5 Nov 2020)*775 * Bugfix: WebP Express uses live tests to determine the capabilities of the server in respect to .htaccess files (using the htaccess-capability-tester library). The results are used for warnings and also for optimizing the rules in the .htaccess files. However, HTTP Requests can fail due to other reasons than the feature not working (ie timeout). Such failures should lead to an indeterminate result, but it was interpreted as if the feature was not working.776 * The Live test now displays a bit more information if the HTTP request failed.777 * Changed default value for "destination structure" to "Image roots", as "Document root" doesn't work on hosts that have defined DOCUMENT_ROOT in an unusual way.778 * Added possibility to change "%{DOCUMENT_ROOT}" part of RewriteCond by adding a line to wp-config.php. THIS IS A BETA FEATURE AND MIGHT BE REVOKED IF NOBODY ACTUALLY NEEDS IT.779 * Got rid of PHP notice Constant WEBPEXPRESS_MIGRATION_VERSION already defined780 * Fixed donation link. It now points to https://ko-fi.com/rosell again781 782 For more info, see the closed issues on the 0.18.3 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/34?closed=1783 729 784 730 ## Supporting WebP Express … … 789 735 790 736 791 **Persons / Companies currently backing the project via patreon - Thanks!** 792 793 - Max Kreminsky 794 - Nodeflame 795 - [Mathieu Gollain-Dupont](https://www.linkedin.com/in/mathieu-gollain-dupont-9938a4a/) 796 - Ruben Solvang 797 798 **Persons who contributed with coffee within the last 30 days:** 799 800 | Name | Date | Message | 801 | ---------------------- | -------------- | ------------ | 802 | Anon | 2020-08-18 | - | 803 | Eder Ribeiro | 2020-08-08 | Hello Bjørn I believe that it is a fantastic solution and that it deserves maximum support to keep getting better! If you can, check out my configuration tip, https://github.com/rosell-dk/webp-express/issues/433 | 804 | Christian | 2020-08-05 | Merci pour votre plugin. Exceptionnel et gratuit. | 805 806 807 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>50$) - thanks!:** 808 809 | Name | Amount | Message | 810 | ---------------------- | -----------| --------- | 811 | Justin - BigScoots | $105 | Such an amazing plugin for so many reasons, thank you! | 812 | Sebastian | $99 | WebP for Wordpress – what a great plugin! Thank you! | 813 | Tammy Lee | $90 | | 814 | Max Kreminsky | $65 | | 815 | Steven Sullivan | $51 | Thank you for such a wonderful plugin. | 737 **Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!** 738 739 * 5 Jan: Joel 740 * 24 Dec: Patrick Müller 741 * 16 Dec: Dragos 742 * 9 Aug: Tanzi 743 * 3 Jul: Jen 744 * 26 Jun: Per 745 746 747 **Persons who recently contributed on [github sponsors](https://github.com/sponsors/rosell-dk) - Thanks!** 748 * 16 Dec: kcrlost 749 * 16 Dec: Yakovos Frountas (Greece) 750 751 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>30$) - thanks!:** 752 753 * Patrick Müller ($250) 754 * Max Kreminsky ($115) 755 * Justin - BigScoots ($105) 756 * Bill Vallance ($102) 757 * Joel ($100) 758 * Label Vier ($100) 759 * Sebastian ($99) 760 * Tammy Lee ($90) 761 * Steven Sullivan ($51) 762 * Mathieu Gollain-Dupont ($50) 763 * Erica Dreisbach ($50) 764 * Brian Laursen ($50) 765 * Dimitris Vayenas ($50) -
webp-express/tags/0.25.14/README.txt
r3427221 r3439201 5 5 Requires at least: 4.0 6 6 Tested up to: 6.9 7 Stable tag: 0.25.1 37 Stable tag: 0.25.14 8 8 Requires PHP: 5.6 9 9 License: GPLv3 … … 174 174 **Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!** 175 175 176 * 5 Jan: Joel 176 177 * 24 Dec: Patrick Müller 177 178 * 16 Dec: Dragos … … 189 190 * 16 Dec: Yakovos Frountas (Greece) 190 191 191 **Persons who contributed with extra generously amounts of coffee / lifetime backing (> 30$) - thanks!:**192 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>80$) - thanks!:** 192 193 193 194 * Patrick Müller ($250) … … 195 196 * Justin - BigScoots ($105) 196 197 * Bill Vallance ($102) 198 * Joel ($100) 197 199 * Label Vier ($100) 198 200 * Sebastian ($99) 199 201 * Tammy Lee ($90) 200 * Steven Sullivan ($51)201 * Mathieu Gollain-Dupont ($50)202 * Erica Dreisbach ($50)203 * Brian Laursen ($50)204 * Dimitris Vayenas ($50)205 202 206 203 == Frequently Asked Questions == … … 835 832 == Changelog == 836 833 834 = 0.25.14 = 835 (released 25 December 2025) 836 * Fixed issue that the delete images feature also deleted webp-images that was uploaded as such, when webp-express was configured to store converted images in same folder as originals (not the default option). Also fixed conversion triggered by redirection, which broke on a few systems in a recent update, causing images in the media library not to appear. It may however still be a problem on a very few systems. In that case: Simply disable "Enable redirection to converter" and "Create webp files upon request" and submit an issue. 837 837 838 = 0.25.13 = 838 839 (released 25 December 2025) … … 899 900 == Upgrade Notice == 900 901 902 = 0.25.14 = 903 * Fixed issue that the delete images feature also deleted webp-images that was uploaded as such, when webp-express was configured to store converted images in same folder as originals (not the default option). Also fixed conversion triggered by redirection, which broke on a few systems in a recent update, causing images in the media library not to appear. It may however still be a problem on a very few systems. In that case: Simply disable "Enable redirection to converter" and "Create webp files upon request" and submit an issue 904 901 905 = 0.25.13 = 902 906 * It is no longer a requirement on Nginx to modify redirection rules by adding a "hash" parameter. This was briefly required in 0.25.10-12 -
webp-express/tags/0.25.14/docs/publishing.md
r3427221 r3439201 53 53 - https://developer.wordpress.org/plugins/wordpress-org/ 54 54 - Validate the readme: https://wordpress.org/plugins/developers/readme-validator/ 55 - Update contributions sections in `README.txt` as well as `README.md` 55 56 - Make sure you have pushed the latest commits to github 56 57 - Make sure you have released the new version on github -
webp-express/tags/0.25.14/lib/classes/CachePurge.php
r2626571 r3439201 7 7 use \WebPExpress\DismissableMessages; 8 8 use \WebPExpress\Paths; 9 use WebPExpress\MediaLibraryHelper; 10 11 9 12 10 13 // TODO! Needs to be updated to work with the new "destination-structure" setting … … 23 26 $filter = [ 24 27 'only-png' => $onlyPng, 25 'only-with-corresponding-original' => false 28 'only-with-corresponding-original' => false, 29 'check-if-registered' => ($config['destination-folder'] === 'mingled') 26 30 ]; 27 31 … … 52 56 53 57 } 54 55 58 56 59 /** … … 93 96 if (!$skipThis && !preg_match('#\.webp$#', $filename)) { 94 97 $skipThis = true; 98 } 99 100 // filter: never delete media library originals 101 if (!$skipThis && $filter['check-if-registered'] && MediaLibraryHelper::isRegisteredAttachmentOrThumbnail($dir . '/' . $filename)) { 102 $skipThis = true; 103 95 104 } 96 105 -
webp-express/tags/0.25.14/lib/classes/ConvertHelperIndependent.php
r3427221 r3439201 572 572 573 573 // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version 574 $text = 'WebP Express 0.25.1 3. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;574 $text = 'WebP Express 0.25.14. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text; 575 575 576 576 $logFile = self::getLogFilename($source, $logDir); -
webp-express/tags/0.25.14/lib/classes/WodConfigLoader.php
r3427221 r3439201 91 91 } 92 92 93 protected static function getPassedHash() { 94 // First check if it is passed in as an environment variable 95 $hash = self::getEnvPassedInRewriteRule('HASH'); 96 if ($hash !== false) { 97 return $hash; 98 } 99 // Then check if it is passed in the query string 100 if (isset($_GET['hash'])) { 101 return $_GET['hash']; 102 } 103 return false; 104 } 105 106 93 107 protected static function getWebPExpressContentDirWithDocRoot() 94 108 { … … 184 198 * Find the hash from config.[hash].json inside a directory. 185 199 * 186 * @param string $configDir Absolute or relative path to the config directory 187 * @return string Hash string, or empty string if not found 200 * @param string $configDir Absolute path to the config directory (no trailing slash) 188 201 */ 189 protected static function findConfigHashByInspection($configDir) 190 { 191 // Normalize directory path 192 $configDir = rtrim($configDir, DIRECTORY_SEPARATOR); 193 194 if (!is_dir($configDir) || !is_readable($configDir)) { 195 return ''; 196 } 197 198 $files = glob($configDir . DIRECTORY_SEPARATOR . 'config.*.json'); 202 protected static function findConfigFileByInspection($configDir) 203 { 204 if (!is_dir($configDir)) { 205 throw new \Exception( 206 'WebP Express configuration directory was not found. ' . 207 'Please check that wp-content/webp-express/config exists and is readable.' 208 ); 209 } 210 211 if (!is_readable($configDir)) { 212 throw new \Exception('WebP Express configuration directory is not readable. Please fix the permissions (wp-content/webp-express/config)'); 213 } 214 215 $files = glob($configDir . '/wod-options.*.json'); 199 216 200 217 if ($files === false || empty($files)) { 201 return ''; 202 } 218 // Failed finding the pattern. Lets see if old plain "wod-options.json" is there due to migration not complete 219 $oldFileName = $configDir . '/wod-options.json'; 220 if (file_exists($oldFileName)) { 221 return $oldFileName; 222 } 223 throw new \Exception('Could not find a file that matches the pattern "wod-options.[hash].json" in the config dir. Is it there? Please check manually in this folder: wp-content/webp-express/config'); 224 } 225 226 // We expect only one match. But failed migrations / manual restores could perhaps cause there to be several 227 // So therefore, lets make sure to pick the newest file, in case there are several 228 usort($files, function ($a, $b) { 229 return filemtime($b) <=> filemtime($a); 230 }); 231 232 $configFilename = $files[0]; 233 if (!file_exists($configFilename)) { 234 throw new \Exception('Configuration file found in filesystem, but at the same, it seems not to exist!'); 235 } 236 return $configFilename; 203 237 204 238 // Take the first match 205 $filename = basename($files[0]); 206 239 //$filename = basename($files[0]); 207 240 // Extract hash between "config." and ".json" 208 if (preg_match('/^config\.([a-f0-9]+)\.json$/i', $filename, $matches)) { 241 /* 242 if (preg_match('/^wod-options\.([a-f0-9]+)\.json$/i', $filename, $matches)) { 209 243 return $matches[1]; 210 } 211 212 return ''; 244 }*/ 245 // throw new \Exception('The filename Could not find a file that matches the pattern "wod-options.[hash].json" in the config dir. Is it there? Please check manually in this folder: wp-content/webp-express/config'); 213 246 } 214 247 … … 251 284 self::$checking = 'config file'; 252 285 253 $hash = self::get EnvPassedInRewriteRule('HASH');286 $hash = self::getPassedHash(); 254 287 if ($hash === false) { 255 // Passed in QS? 256 if (isset($_GET['hash'])) { 257 $hash = $_GET['hash']; 258 } else { 259 // In case above fails, find the hash by browsing the config dir 260 $hash = self::findConfigHashByInspection(self::$webExpressContentDirAbs . '/config/'); 261 } 262 } 263 264 $filename = ''; 265 266 if ($hash == '') { 267 $filename = 'wod-options.json'; 288 self::$checking = 'finding config file by introspecting config dir'; 289 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 268 290 } else { 269 $filename = 'wod-options.' . $hash . '.json'; 270 } 271 272 273 $configFilename = self::$webExpressContentDirAbs . '/config/' . $filename; 274 if (!file_exists($configFilename)) { 275 throw new \Exception('Configuration file was not found (' . $filename . ')'); 291 $hash = SanityCheck::noDirectoryTraversal($hash); 292 if (!preg_match('/^[a-f0-9]{32}$/i', $hash)) { 293 //throw new \Exception('Provided hash does not match correct pattern. Hash is expected to be 32 chars of letters/digits. Check the .htaccess files, its where the hash comes from (unless you are using Nginx - then check your Nginx rewrite rules)'); 294 self::$checking = 'finding config file by introspecting config dir (as no hash passed in did not conform to expected pattern, which is 32 chars of letters/digits)'; 295 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 296 } 297 else { 298 $filename = 'wod-options.' . $hash . '.json'; 299 $configFilename = self::$webExpressContentDirAbs . '/config/' . $filename; 300 if (!file_exists($configFilename)) { 301 self::$checking = 'finding config file by introspecting config dir (as no config file was found using hash passed in)'; 302 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 303 } 304 } 276 305 } 277 306 … … 280 309 $configLoadResult = file_get_contents($configFilename); 281 310 if ($configLoadResult === false) { 282 throw new \Exception('Cannot open config file ');311 throw new \Exception('Cannot open config file: ' . $configFilename); 283 312 } 284 313 $json = SanityCheck::isJSONObject($configLoadResult); -
webp-express/tags/0.25.14/lib/dismissable-global-messages/0.25.10/renamed-config-file.php
r3425690 r3439201 5 5 $msgId = '0.25.10/renamed-config-file'; 6 6 7 /* 7 8 DismissableGlobalMessages::printDismissableMessage( 8 9 'info', … … 15 16 ] 16 17 ); 18 */ 19 20 // The message is old news, so dismiss it, so this code is not run again 21 DismissableGlobalMessages::dismissMessage($msgId); -
webp-express/tags/0.25.14/lib/dismissable-global-messages/0.25.11/updated-htaccess.php
r3425653 r3439201 3 3 namespace WebPExpress; 4 4 5 5 /* 6 6 DismissableGlobalMessages::printDismissableMessage( 7 7 'info', … … 12 12 ] 13 13 ); 14 */ 15 16 // The message is no longer relevant, as it is no longer neccessary 17 // So dismiss it, so this code is not run again 18 DismissableGlobalMessages::dismissMessage('0.25.11/updated-htaccess'); -
webp-express/tags/0.25.14/lib/dismissable-global-messages/0.25.12/nginx-rewrites-needs-updating.php
r3427221 r3439201 5 5 $msgId = '0.25.12/nginx-rewrites-needs-updating'; 6 6 7 /* 7 8 DismissableGlobalMessages::printDismissableMessage( 8 9 'info', … … 16 17 ] 17 18 ); 19 */ 18 20 19 // In next version, after 0.25.13, we can dismiss the message completely, like this: 20 // DismissableGlobalMessages::dismissMessage($msgId); 21 // The message is no longer relevant, as it is no longer neccessary to pass the hash 22 // So dismiss it, so this code is not run again 23 DismissableGlobalMessages::dismissMessage($msgId); -
webp-express/tags/0.25.14/webp-express.php
r3427221 r3439201 4 4 * Plugin URI: https://github.com/rosell-dk/webp-express 5 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.25.1 36 * Version: 0.25.14 7 7 * Author: Bjørn Rosell 8 8 * Author URI: https://www.bitwise-it.dk … … 41 41 function webp_express_process_post() { 42 42 // strip query string 43 $requestUriNoQS = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); 44 //echo '<pre>' . print_r($_SERVER, true) . '</pre>'; die(); 43 $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; 44 $requestUriNoQS = parse_url($requestUri, PHP_URL_PATH); 45 46 if (!is_string($requestUriNoQS)) { 47 $requestUriNoQS = ''; 48 } 45 49 46 50 if (preg_match('/webp-express-web-service$/', $requestUriNoQS)) { -
webp-express/trunk/README.md
r3425690 r3439201 727 727 I generally create a pre-release before publishing. If you [follow me on ko-fi](https://ko-fi.com/rosell), you will get notified when a pre-release is available. I generally create a pre-release on fridays and mark it as stable on mondays. In order to download a pre-release, go to [the advanced page](https://wordpress.org/plugins/webp-express/advanced/) and scroll down to "Please select a specific version to download". I don't name the pre-releases different. You will just see the next version here before it is available the usual way. 728 728 729 ## Changes in 0.21.1730 *(released: 27 Oct 2021)*731 * Bugfix: File manager could not handle many images. It now loads tree branches on need basis instead of the complete tree in one go732 * Bugfix: For mulisite, the redirect after settings save was not working (bug introduced in 0.21.0)733 734 For more info, see the closed issues on the [webp-express 0.21.1 milestone](https://github.com/rosell-dk/webp-express/milestone/42?closed=1)735 736 ## Changes in 0.21.0737 *(released: 25 Oct 2021)*738 * Added image browser (in Media tab)739 * Updated webp convert library to 2.7.0.740 * ImageMagick now supports the "near-lossless" option (provided Imagick >= 7.0.10-54)741 * Added "try-common-system-paths" option for ImageMagick (default: true). Thanks to Henrik Alves for adding this option.742 * Bugfix: Handling Uncaught Fatal Exception during .htaccess read failure. Thanks to Manuel D'Orso from Italy for the fix.743 * Bugfix: File names which were not UTF8 caused trouble in the Bulk Convert. Thank to "mills4078" for the fix744 * Bugfix: Redirection back to settings after saving settings failed on some systems. Thanks to Martin Rehberger (@kingkero) from Germany for the fix.745 * Bugfix: Webp urls did not contain port number (only relevant when the website was not on default port number). Thanks to Nicolas LIENART (@nicolnt) from France for providing the fix.746 747 For more info, see the closed issues on the [webp-express 0.21.0 milestone](https://github.com/rosell-dk/webp-express/milestone/41?closed=1) and the748 [webp-convert 2.7.0 milestone](https://github.com/rosell-dk/webp-convert/milestone/24?closed=1)749 750 751 ## Changes in 0.20.1752 *(released: 20 Jun 2021)*753 * Bugfix: Removed composer.lock. It was locked on PHP 7.2, which caused server error on some sites.754 755 ## Changes in 0.20.0756 *(released: 17 Jun 2021)*757 * Added WP CLI support. Add "wp webp-express convert" to crontab for nightly conversions of new images! Thanks to Isuru Sampath Ratnayake from Sri Lanka for initializing this.758 * Added "sharp-yuv" (not as option, but as always on). Better YUV->RGB color conversion at almost no price. [Read more here](https://www.ctrl.blog/entry/webp-sharp-yuv.html). Supported by cwebp, vips, gmagick, graphicsmagick, imagick and imagemagick759 * Bumped cwebp binaries to 1.2.0760 * cwebp now only validates hash of supplied precompiled binaries when necessary. This cuts down conversion time.761 * Convert on upload now defaults to false, as it may impact upload experience in themes with many formats.762 * bugfix: Alpha quality was saved incorrectly for PNG. Thanks to Chriss Gibbs from the UK for finding and fixing this.763 * bugfix: wp-debug log could be flooded with "Undefined index: HTTP_ACCEPT". Thanks to @markusreis for finding and fixing this.764 765 ## Changes in 0.19.0766 *(released: 13 Nov 2020)*767 * New convertion method: ffmpeg768 * Fixed problem in Bulk Convert when files had special characters in their filename769 * Prevented problems if the plugin gets included twice (can anybody enlighten me on how this might happen?)770 771 For more info, see the closed issues on the [0.19.0 milestone on the github repository](https://github.com/rosell-dk/webp-express/milestone/36?closed=1)772 773 ## Changes in 0.18.3774 *(released: 5 Nov 2020)*775 * Bugfix: WebP Express uses live tests to determine the capabilities of the server in respect to .htaccess files (using the htaccess-capability-tester library). The results are used for warnings and also for optimizing the rules in the .htaccess files. However, HTTP Requests can fail due to other reasons than the feature not working (ie timeout). Such failures should lead to an indeterminate result, but it was interpreted as if the feature was not working.776 * The Live test now displays a bit more information if the HTTP request failed.777 * Changed default value for "destination structure" to "Image roots", as "Document root" doesn't work on hosts that have defined DOCUMENT_ROOT in an unusual way.778 * Added possibility to change "%{DOCUMENT_ROOT}" part of RewriteCond by adding a line to wp-config.php. THIS IS A BETA FEATURE AND MIGHT BE REVOKED IF NOBODY ACTUALLY NEEDS IT.779 * Got rid of PHP notice Constant WEBPEXPRESS_MIGRATION_VERSION already defined780 * Fixed donation link. It now points to https://ko-fi.com/rosell again781 782 For more info, see the closed issues on the 0.18.3 milestone on the github repository: https://github.com/rosell-dk/webp-express/milestone/34?closed=1783 729 784 730 ## Supporting WebP Express … … 789 735 790 736 791 **Persons / Companies currently backing the project via patreon - Thanks!** 792 793 - Max Kreminsky 794 - Nodeflame 795 - [Mathieu Gollain-Dupont](https://www.linkedin.com/in/mathieu-gollain-dupont-9938a4a/) 796 - Ruben Solvang 797 798 **Persons who contributed with coffee within the last 30 days:** 799 800 | Name | Date | Message | 801 | ---------------------- | -------------- | ------------ | 802 | Anon | 2020-08-18 | - | 803 | Eder Ribeiro | 2020-08-08 | Hello Bjørn I believe that it is a fantastic solution and that it deserves maximum support to keep getting better! If you can, check out my configuration tip, https://github.com/rosell-dk/webp-express/issues/433 | 804 | Christian | 2020-08-05 | Merci pour votre plugin. Exceptionnel et gratuit. | 805 806 807 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>50$) - thanks!:** 808 809 | Name | Amount | Message | 810 | ---------------------- | -----------| --------- | 811 | Justin - BigScoots | $105 | Such an amazing plugin for so many reasons, thank you! | 812 | Sebastian | $99 | WebP for Wordpress – what a great plugin! Thank you! | 813 | Tammy Lee | $90 | | 814 | Max Kreminsky | $65 | | 815 | Steven Sullivan | $51 | Thank you for such a wonderful plugin. | 737 **Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!** 738 739 * 5 Jan: Joel 740 * 24 Dec: Patrick Müller 741 * 16 Dec: Dragos 742 * 9 Aug: Tanzi 743 * 3 Jul: Jen 744 * 26 Jun: Per 745 746 747 **Persons who recently contributed on [github sponsors](https://github.com/sponsors/rosell-dk) - Thanks!** 748 * 16 Dec: kcrlost 749 * 16 Dec: Yakovos Frountas (Greece) 750 751 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>30$) - thanks!:** 752 753 * Patrick Müller ($250) 754 * Max Kreminsky ($115) 755 * Justin - BigScoots ($105) 756 * Bill Vallance ($102) 757 * Joel ($100) 758 * Label Vier ($100) 759 * Sebastian ($99) 760 * Tammy Lee ($90) 761 * Steven Sullivan ($51) 762 * Mathieu Gollain-Dupont ($50) 763 * Erica Dreisbach ($50) 764 * Brian Laursen ($50) 765 * Dimitris Vayenas ($50) -
webp-express/trunk/README.txt
r3427221 r3439201 5 5 Requires at least: 4.0 6 6 Tested up to: 6.9 7 Stable tag: 0.25.1 37 Stable tag: 0.25.14 8 8 Requires PHP: 5.6 9 9 License: GPLv3 … … 174 174 **Persons who recently contributed with [ko-fi](https://ko-fi.com/rosell) - Thanks!** 175 175 176 * 5 Jan: Joel 176 177 * 24 Dec: Patrick Müller 177 178 * 16 Dec: Dragos … … 189 190 * 16 Dec: Yakovos Frountas (Greece) 190 191 191 **Persons who contributed with extra generously amounts of coffee / lifetime backing (> 30$) - thanks!:**192 **Persons who contributed with extra generously amounts of coffee / lifetime backing (>80$) - thanks!:** 192 193 193 194 * Patrick Müller ($250) … … 195 196 * Justin - BigScoots ($105) 196 197 * Bill Vallance ($102) 198 * Joel ($100) 197 199 * Label Vier ($100) 198 200 * Sebastian ($99) 199 201 * Tammy Lee ($90) 200 * Steven Sullivan ($51)201 * Mathieu Gollain-Dupont ($50)202 * Erica Dreisbach ($50)203 * Brian Laursen ($50)204 * Dimitris Vayenas ($50)205 202 206 203 == Frequently Asked Questions == … … 835 832 == Changelog == 836 833 834 = 0.25.14 = 835 (released 25 December 2025) 836 * Fixed issue that the delete images feature also deleted webp-images that was uploaded as such, when webp-express was configured to store converted images in same folder as originals (not the default option). Also fixed conversion triggered by redirection, which broke on a few systems in a recent update, causing images in the media library not to appear. It may however still be a problem on a very few systems. In that case: Simply disable "Enable redirection to converter" and "Create webp files upon request" and submit an issue. 837 837 838 = 0.25.13 = 838 839 (released 25 December 2025) … … 899 900 == Upgrade Notice == 900 901 902 = 0.25.14 = 903 * Fixed issue that the delete images feature also deleted webp-images that was uploaded as such, when webp-express was configured to store converted images in same folder as originals (not the default option). Also fixed conversion triggered by redirection, which broke on a few systems in a recent update, causing images in the media library not to appear. It may however still be a problem on a very few systems. In that case: Simply disable "Enable redirection to converter" and "Create webp files upon request" and submit an issue 904 901 905 = 0.25.13 = 902 906 * It is no longer a requirement on Nginx to modify redirection rules by adding a "hash" parameter. This was briefly required in 0.25.10-12 -
webp-express/trunk/docs/publishing.md
r3427221 r3439201 53 53 - https://developer.wordpress.org/plugins/wordpress-org/ 54 54 - Validate the readme: https://wordpress.org/plugins/developers/readme-validator/ 55 - Update contributions sections in `README.txt` as well as `README.md` 55 56 - Make sure you have pushed the latest commits to github 56 57 - Make sure you have released the new version on github -
webp-express/trunk/lib/classes/CachePurge.php
r2626571 r3439201 7 7 use \WebPExpress\DismissableMessages; 8 8 use \WebPExpress\Paths; 9 use WebPExpress\MediaLibraryHelper; 10 11 9 12 10 13 // TODO! Needs to be updated to work with the new "destination-structure" setting … … 23 26 $filter = [ 24 27 'only-png' => $onlyPng, 25 'only-with-corresponding-original' => false 28 'only-with-corresponding-original' => false, 29 'check-if-registered' => ($config['destination-folder'] === 'mingled') 26 30 ]; 27 31 … … 52 56 53 57 } 54 55 58 56 59 /** … … 93 96 if (!$skipThis && !preg_match('#\.webp$#', $filename)) { 94 97 $skipThis = true; 98 } 99 100 // filter: never delete media library originals 101 if (!$skipThis && $filter['check-if-registered'] && MediaLibraryHelper::isRegisteredAttachmentOrThumbnail($dir . '/' . $filename)) { 102 $skipThis = true; 103 95 104 } 96 105 -
webp-express/trunk/lib/classes/ConvertHelperIndependent.php
r3427221 r3439201 572 572 573 573 // TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version 574 $text = 'WebP Express 0.25.1 3. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;574 $text = 'WebP Express 0.25.14. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text; 575 575 576 576 $logFile = self::getLogFilename($source, $logDir); -
webp-express/trunk/lib/classes/WodConfigLoader.php
r3427221 r3439201 91 91 } 92 92 93 protected static function getPassedHash() { 94 // First check if it is passed in as an environment variable 95 $hash = self::getEnvPassedInRewriteRule('HASH'); 96 if ($hash !== false) { 97 return $hash; 98 } 99 // Then check if it is passed in the query string 100 if (isset($_GET['hash'])) { 101 return $_GET['hash']; 102 } 103 return false; 104 } 105 106 93 107 protected static function getWebPExpressContentDirWithDocRoot() 94 108 { … … 184 198 * Find the hash from config.[hash].json inside a directory. 185 199 * 186 * @param string $configDir Absolute or relative path to the config directory 187 * @return string Hash string, or empty string if not found 200 * @param string $configDir Absolute path to the config directory (no trailing slash) 188 201 */ 189 protected static function findConfigHashByInspection($configDir) 190 { 191 // Normalize directory path 192 $configDir = rtrim($configDir, DIRECTORY_SEPARATOR); 193 194 if (!is_dir($configDir) || !is_readable($configDir)) { 195 return ''; 196 } 197 198 $files = glob($configDir . DIRECTORY_SEPARATOR . 'config.*.json'); 202 protected static function findConfigFileByInspection($configDir) 203 { 204 if (!is_dir($configDir)) { 205 throw new \Exception( 206 'WebP Express configuration directory was not found. ' . 207 'Please check that wp-content/webp-express/config exists and is readable.' 208 ); 209 } 210 211 if (!is_readable($configDir)) { 212 throw new \Exception('WebP Express configuration directory is not readable. Please fix the permissions (wp-content/webp-express/config)'); 213 } 214 215 $files = glob($configDir . '/wod-options.*.json'); 199 216 200 217 if ($files === false || empty($files)) { 201 return ''; 202 } 218 // Failed finding the pattern. Lets see if old plain "wod-options.json" is there due to migration not complete 219 $oldFileName = $configDir . '/wod-options.json'; 220 if (file_exists($oldFileName)) { 221 return $oldFileName; 222 } 223 throw new \Exception('Could not find a file that matches the pattern "wod-options.[hash].json" in the config dir. Is it there? Please check manually in this folder: wp-content/webp-express/config'); 224 } 225 226 // We expect only one match. But failed migrations / manual restores could perhaps cause there to be several 227 // So therefore, lets make sure to pick the newest file, in case there are several 228 usort($files, function ($a, $b) { 229 return filemtime($b) <=> filemtime($a); 230 }); 231 232 $configFilename = $files[0]; 233 if (!file_exists($configFilename)) { 234 throw new \Exception('Configuration file found in filesystem, but at the same, it seems not to exist!'); 235 } 236 return $configFilename; 203 237 204 238 // Take the first match 205 $filename = basename($files[0]); 206 239 //$filename = basename($files[0]); 207 240 // Extract hash between "config." and ".json" 208 if (preg_match('/^config\.([a-f0-9]+)\.json$/i', $filename, $matches)) { 241 /* 242 if (preg_match('/^wod-options\.([a-f0-9]+)\.json$/i', $filename, $matches)) { 209 243 return $matches[1]; 210 } 211 212 return ''; 244 }*/ 245 // throw new \Exception('The filename Could not find a file that matches the pattern "wod-options.[hash].json" in the config dir. Is it there? Please check manually in this folder: wp-content/webp-express/config'); 213 246 } 214 247 … … 251 284 self::$checking = 'config file'; 252 285 253 $hash = self::get EnvPassedInRewriteRule('HASH');286 $hash = self::getPassedHash(); 254 287 if ($hash === false) { 255 // Passed in QS? 256 if (isset($_GET['hash'])) { 257 $hash = $_GET['hash']; 258 } else { 259 // In case above fails, find the hash by browsing the config dir 260 $hash = self::findConfigHashByInspection(self::$webExpressContentDirAbs . '/config/'); 261 } 262 } 263 264 $filename = ''; 265 266 if ($hash == '') { 267 $filename = 'wod-options.json'; 288 self::$checking = 'finding config file by introspecting config dir'; 289 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 268 290 } else { 269 $filename = 'wod-options.' . $hash . '.json'; 270 } 271 272 273 $configFilename = self::$webExpressContentDirAbs . '/config/' . $filename; 274 if (!file_exists($configFilename)) { 275 throw new \Exception('Configuration file was not found (' . $filename . ')'); 291 $hash = SanityCheck::noDirectoryTraversal($hash); 292 if (!preg_match('/^[a-f0-9]{32}$/i', $hash)) { 293 //throw new \Exception('Provided hash does not match correct pattern. Hash is expected to be 32 chars of letters/digits. Check the .htaccess files, its where the hash comes from (unless you are using Nginx - then check your Nginx rewrite rules)'); 294 self::$checking = 'finding config file by introspecting config dir (as no hash passed in did not conform to expected pattern, which is 32 chars of letters/digits)'; 295 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 296 } 297 else { 298 $filename = 'wod-options.' . $hash . '.json'; 299 $configFilename = self::$webExpressContentDirAbs . '/config/' . $filename; 300 if (!file_exists($configFilename)) { 301 self::$checking = 'finding config file by introspecting config dir (as no config file was found using hash passed in)'; 302 $configFilename = self::findConfigFileByInspection(self::$webExpressContentDirAbs . '/config'); 303 } 304 } 276 305 } 277 306 … … 280 309 $configLoadResult = file_get_contents($configFilename); 281 310 if ($configLoadResult === false) { 282 throw new \Exception('Cannot open config file ');311 throw new \Exception('Cannot open config file: ' . $configFilename); 283 312 } 284 313 $json = SanityCheck::isJSONObject($configLoadResult); -
webp-express/trunk/lib/dismissable-global-messages/0.25.10/renamed-config-file.php
r3425690 r3439201 5 5 $msgId = '0.25.10/renamed-config-file'; 6 6 7 /* 7 8 DismissableGlobalMessages::printDismissableMessage( 8 9 'info', … … 15 16 ] 16 17 ); 18 */ 19 20 // The message is old news, so dismiss it, so this code is not run again 21 DismissableGlobalMessages::dismissMessage($msgId); -
webp-express/trunk/lib/dismissable-global-messages/0.25.11/updated-htaccess.php
r3425653 r3439201 3 3 namespace WebPExpress; 4 4 5 5 /* 6 6 DismissableGlobalMessages::printDismissableMessage( 7 7 'info', … … 12 12 ] 13 13 ); 14 */ 15 16 // The message is no longer relevant, as it is no longer neccessary 17 // So dismiss it, so this code is not run again 18 DismissableGlobalMessages::dismissMessage('0.25.11/updated-htaccess'); -
webp-express/trunk/lib/dismissable-global-messages/0.25.12/nginx-rewrites-needs-updating.php
r3427221 r3439201 5 5 $msgId = '0.25.12/nginx-rewrites-needs-updating'; 6 6 7 /* 7 8 DismissableGlobalMessages::printDismissableMessage( 8 9 'info', … … 16 17 ] 17 18 ); 19 */ 18 20 19 // In next version, after 0.25.13, we can dismiss the message completely, like this: 20 // DismissableGlobalMessages::dismissMessage($msgId); 21 // The message is no longer relevant, as it is no longer neccessary to pass the hash 22 // So dismiss it, so this code is not run again 23 DismissableGlobalMessages::dismissMessage($msgId); -
webp-express/trunk/webp-express.php
r3427221 r3439201 4 4 * Plugin URI: https://github.com/rosell-dk/webp-express 5 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.25.1 36 * Version: 0.25.14 7 7 * Author: Bjørn Rosell 8 8 * Author URI: https://www.bitwise-it.dk … … 41 41 function webp_express_process_post() { 42 42 // strip query string 43 $requestUriNoQS = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); 44 //echo '<pre>' . print_r($_SERVER, true) . '</pre>'; die(); 43 $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; 44 $requestUriNoQS = parse_url($requestUri, PHP_URL_PATH); 45 46 if (!is_string($requestUriNoQS)) { 47 $requestUriNoQS = ''; 48 } 45 49 46 50 if (preg_match('/webp-express-web-service$/', $requestUriNoQS)) {
Note: See TracChangeset
for help on using the changeset viewer.