Skip to content

Commit

Permalink
Merge branch 'release/4.0.12' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Feb 6, 2025
2 parents a428037 + 62e0faa commit 9258178
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# ImageOptimize Changelog

## 4.0.12 - 2025.02.06
## Fixed
* Reverted `srcset` width filtering ([#416](https://github.com/nystudio107/craft-imageoptimize/pull/416)) to address ([#418](https://github.com/nystudio107/craft-imageoptimize/issues/418))

## 4.0.11 - 2025.01.13
## Fixed
* Don't try to apply filters to assets that are seemingly corrupt, and have a `0` width or `0` height ([#383](https://github.com/nystudio107/craft-imageoptimize/issues/383))
* Fixed `srcset` width filtering ([](https://github.com/nystudio107/craft-imageoptimize/pull/416))
* Fixed `srcset` width filtering ([#416](https://github.com/nystudio107/craft-imageoptimize/pull/416))

## 4.0.10 - 2024.10.21
## Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-imageoptimize",
"description": "Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like imgix, with zero template changes.",
"type": "craft-plugin",
"version": "4.0.11",
"version": "4.0.12",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 2 additions & 0 deletions src/models/OptimizedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ protected function getSrcsetSubsetArray(array $set, int $width, string $comparis
if (empty($this->variantSourceWidths)) {
return $subset;
}
// Sort the arrays by numeric key
ksort($set, SORT_NUMERIC);
// Sort the source widths by numeric key
sort($this->variantSourceWidths, SORT_NUMERIC);
foreach ($this->variantSourceWidths as $variantSourceWidth) {
Expand Down

0 comments on commit 9258178

Please sign in to comment.