Skip to content

Commit

Permalink
0.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rosell-dk committed Dec 7, 2021
1 parent 4fde709 commit 877e7ff
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 18 deletions.
67 changes: 53 additions & 14 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://ko-fi.com/rosell
Tags: webp, images, performance
Requires at least: 4.0
Tested up to: 5.8
Stable tag: 0.24.2
Stable tag: 0.25.0
Requires PHP: 5.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -135,24 +135,26 @@ There are several ways:

### WP CLI command
WebP Express currently supports commands for converting and flushing webp images throug the CLI. You can use the --help option to learn about the options:
`wp webp-express --help`. Displays the available commands
`wp webp-express convert --help`. Displays the available options for the "convert" command.
*wp webp-express --help*. Displays the available commands
*wp webp-express convert --help*. Displays the available options for the "convert" command.

A few examples:
`wp webp-express convert`: Creates webp images for all unconverted images
`wp webp-express convert --reconvert`: Also convert images that are already converted
`wp webp-express convert themes`: Only images in the themes folder
`wp webp-express convert uploads/2021`: Only images in the "2021" folder inside the uploads folder
`wp webp-express convert --only-png`: Only the PNG images
`wp webp-express convert --quality=50`: Use quality 50 (instead of what was entered in settings screen)
`wp webp-express convert --converter=cwebp`: Specifically use cwebp converter.
*wp webp-express convert*: Creates webp images for all unconverted images
*wp webp-express convert --reconvert*: Also convert images that are already converted
*wp webp-express convert themes*: Only images in the themes folder
*wp webp-express convert uploads/2021*: Only images in the "2021" folder inside the uploads folder
*wp webp-express convert --only-png*: Only the PNG images
*wp webp-express convert --quality=50*: Use quality 50 (instead of what was entered in settings screen)
*wp webp-express convert --converter=cwebp*: Specifically use cwebp converter.

`wp webp-express flushwebp`: Remove all webp images
`wp webp-express flushwebp --only-png`: Remove all webp images that are conversions of PNG images
*wp webp-express flushwebp*: Remove all webp images
*wp webp-express flushwebp --only-png*: Remove all webp images that are conversions of PNG images

Synopsises:
`wp webp-express convert [<location>] [--reconvert] [--only-png] [--only-jpeg] [--quality=<number>] [--near-lossless=<number>] [--alpha-quality=<number>] [--encoding=<auto|lossy|lossless>] [--converter=<converter>]`
`wp webp-express flushwebp [--only-png]`
`
wp webp-express convert [<location>] [--reconvert] [--only-png] [--only-jpeg] [--quality=<number>] [--near-lossless=<number>] [--alpha-quality=<number>] [--encoding=<auto|lossy|lossless>] [--converter=<converter>]
wp webp-express flushwebp [--only-png]
`

I'm considering adding commands for viewing status, viewing conversion stats, generating the .htaccess files and modifying the settings. Please let me know if you need any of these or perhaps something else.

Expand Down Expand Up @@ -250,6 +252,35 @@ Easy enough. Browsers looks at the *content type* header rather than the URL to

I am btw considering making an option to have the plugin redirect to the webp instead of serving immediately. That would remove the apparent mismatch between file extension and content type header. However, the cost of doing that will be an extra request for each image, which means extra time and worse performance. I believe you'd be ill advised to use that option, so I guess I will not implement it. But perhaps you have good reasons to use it? If you do, please let me know!

= You mention that I can bulk convert through WP CLI, but how do I use it? =
Well, first, if you don't know WP CLI, here is a [quick start](https://make.wordpress.org/cli/handbook/guides/quick-start/)

WebP Express currently supports commands for converting and flushing webp images throug the CLI. You can use the --help option to learn about the options:
*wp webp-express --help*. Displays the available commands
*wp webp-express convert --help*. Displays the available options for the "convert" command.

A few examples:
*wp webp-express convert*: Creates webp images for all unconverted images
*wp webp-express convert --reconvert*: Also convert images that are already converted
*wp webp-express convert themes*: Only images in the themes folder
*wp webp-express convert uploads/2021*: Only images in the "2021" folder inside the uploads folder
*wp webp-express convert --only-png*: Only the PNG images
*wp webp-express convert --quality=50*: Use quality 50 (instead of what was entered in settings screen)
*wp webp-express convert --quality=50 --near-lossless=50 --alpha-quality=50 --encoding=lossy*: More conversion options. encoding can be "lossy", "lossless" or "auto"
*wp webp-express convert --converter=cwebp*: Specifically use cwebp converter. Other options: "vips", "imagemagick", "ffmpeg". PS: For "ewww" and "wpc" (remote webp express) does not work here.

*wp webp-express flushwebp*: Remove all webp images
*wp webp-express flushwebp --only-png*: Remove all webp images that are conversions of PNG images

Synopsises:
`
wp webp-express convert [<location>] [--reconvert] [--only-png] [--only-jpeg] [--quality=<number>] [--near-lossless=<number>] [--alpha-quality=<number>] [--encoding=<auto|lossy|lossless>] [--converter=<converter>]
wp webp-express flushwebp [--only-png]
`

I'm considering adding commands for viewing status, viewing conversion stats, generating the .htaccess files and modifying the settings. Please let me know if you need any of these or perhaps something else.


= Blank images in Safari? =
WebP Express has three ways of distributing webp to webp-enabled browsers while still sending the originals to webp-disabled browsers. While method 1 can be combined with any of the other methods, you would usually just pick method 1 or one of the others if method 1 cannot be used for you.

Expand Down Expand Up @@ -782,6 +813,11 @@ If you want to make sure that my coffee supplies don't run dry, you can even buy

== Changelog ==

= 0.25.0 =
(released 7 dec 2021, on my daughters 10 year birthday!)
* No exec()? - We don't give up easily, but now emulates it if possible, using proc_open(), passthru() or other alternatives. The result is that the cwebp converter now is available on more systems. Quality detection of jpegs also works on more systems now. The fallback feature with the emulations is btw implemented in a new library, [exec-with-fallback](https://github.com/rosell-dk/exec-with-fallback)
* Bugfix: Our WP CLI command "webp-express" has a quality option, but it was not working

= 0.24.2 =
*(released: 25 Nov 2021)*
* Bugfix: In FileManager, the original image wasn't showing on all systems
Expand Down Expand Up @@ -870,6 +906,9 @@ For older releases, check out changelog.txt

== Upgrade Notice ==

= 0.25.0 =
* No exec()? - We don't give up so easily anymore.

= 0.24.2 =
* Minor bugfix

Expand Down
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
= 0.25.0 =
(released 7 dec 2021, on my daughters 10 year birthday!)
* No exec()? - We don't give up easily, but now emulates it if possible, using proc_open(), passthru() or other alternatives. The result is that the cwebp converter now is available on more systems. Quality detection of jpegs also works on more systems now. The fallback feature with the emulations is btw implemented in a new library, [exec-with-fallback](https://github.com/rosell-dk/exec-with-fallback)
* Bugfix: Our WP CLI command "webp-express" has a quality option, but it was not working

= 0.24.2 =
*(released: 25 Nov 2021)*
* Bugfix: In FileManager, the original image wasn't showing on all systems

= 0.24.1 =
*(released: 24 Nov 2021)*
* Bugfix: On some systems, the converter test run that is done when showing the settings page could result in an uncatched error.

= 0.24.0 =
*(pre-released: 20 Nov 2021, not "released", in the sense that stable tag never pointed to this release)*
* Improved file manager: You can now tweak conversion settings, delete conversion and see mime type of images.
* Conversions logs are made more readable
* Bumped webp-convert to 0.24.0
Expand Down
4 changes: 2 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ svn status | grep '^!' | awk '{print $2}' | xargs svn delete --force (t
Then add a new tag
```
cd svn
svn cp trunk tags/0.24.1 (this will copy trunk into a new tag)
svn cp trunk tags/0.24.2 (this will copy trunk into a new tag)
```

And commit!
```
svn ci -m '0.24.1'
svn ci -m '0.24.2'
```


Expand Down
2 changes: 1 addition & 1 deletion lib/classes/ConvertHelperIndependent.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ private static function saveLog($source, $logDir, $text, $msgTop)
$text = preg_replace('#' . preg_quote($_SERVER["DOCUMENT_ROOT"]) . '#', '[doc-root]', $text);

// TODO: Put version number somewhere else. Ie \WebPExpress\VersionNumber::version
$text = 'WebP Express 0.24.2. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;
$text = 'WebP Express 0.25.0. ' . $msgTop . ', ' . date("Y-m-d H:i:s") . "\n\r\n\r" . $text;

$logFile = self::getLogFilename($source, $logDir);

Expand Down
2 changes: 1 addition & 1 deletion webp-express.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WebP Express
* Plugin URI: https://github.com/rosell-dk/webp-express
* Description: Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP. Works on anything (media library images, galleries, theme images etc).
* Version: 0.24.2
* Version: 0.25.0
* Author: Bjørn Rosell
* Author URI: https://www.bitwise-it.dk
* License: GPL2
Expand Down

0 comments on commit 877e7ff

Please sign in to comment.