Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- `Craft.CP` now triggers a `queueCompleted` event when the last queue job is completed.

### System
- Improve the image quality of WEBP transforms, when `optimizeImageFilesize` is disabled. ([#18635](https://github.com/craftcms/cms/pull/18635))
- Updated Twig to 3.24. ([#18259](https://github.com/craftcms/cms/discussions/18259), [#18454](https://github.com/craftcms/cms/issues/18454))
- Fixed a bug where nested entries weren’t getting loaded with their content, if they had an entry type that was no longer allowed by their Matrix field.
- Fixed the wording of the validation error when saving a nested entry with an invalid entry type. ([#18506](https://github.com/craftcms/cms/issues/18506))
8 changes: 7 additions & 1 deletion src/image/Raster.php
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,13 @@ private function _getSaveOptions(?int $quality, ?string $extension = null): arra
return ['animated' => $this->_isAnimated];

case 'webp':
return ['animated' => $this->_isAnimated, 'webp_quality' => $quality];
$options = ['animated' => $this->_isAnimated];
if (Craft::$app->getConfig()->getGeneral()->optimizeImageFilesize) {
$options['webp_quality'] = $quality;
} else {
$options['webp_lossless'] = true;
}
return $options;

case 'png':
// Valid PNG quality settings are 0-9, so normalize and flip, because we're talking about compression
Expand Down