Skip to content

Better conversions, more options, better code

Pre-release
Pre-release
Compare
Choose a tag to compare
@rosell-dk rosell-dk released this 13 Jun 06:42
· 481 commits to master since this release

This major release started out with the simple wish to have a common base class for the converters. As one should hold back on major releases, I ended up going critically through the whole library, resulting in a lot of internal code changes and some API changes. As many changes increases risk of new bugs, I have also written a lot of test cases, I have doc-commented the entire library, and I have started using Scrutinizer and phpstan to help find problems.

Highlights of this release:

  • A new "encoding" option, which can be set to auto. This can in some cases dramatically reduce the size of the webp. It is supported by all converters except ewww and gd.
  • "near-lossless" option (only for cwebp and vips). Using this is a good idea for reducing size of lossless webps with an acceptable loss of quality
  • "alpha-quality" option (all converters, except ewww and gd). Using this is a good idea when images with transparency are converted to lossy webp - it has the potential to reduce the size up to 50% (depending on the source material) while keeping an acceptable level of quality
  • Vips is now supported
  • Imagick conversion method now supports webp options (finally cracked it!)
  • MimeType detection instead of relying on file extensions

For a better introduction to the new features, I suggest that you read the new conversion introduction.

If you are migrating from version 1.3.9, I suggest you read this