Skip to content

Commit

Permalink
Merge branch 'release/4.0.9' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 19, 2024
2 parents ba9cd8c + 6739e3c commit 40dd097
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ImageOptimize Changelog

## 4.0.9 - 2024.06.19
### Fixed
* Fixed an issue where `srcsetMaxWidth()` could return incorrect results ([#407](https://github.com/nystudio107/craft-imageoptimize/issues/407))
* Fixed an issue where the data-uri for inline SVG styles were incorrect in some browsers because the spaces were not URL-encoded ([#408](https://github.com/nystudio107/craft-imageoptimize/issues/408))

## 4.0.8 - 2024.05.09
### Fixed
* Fixed an issue where the `.imgTag()` and `.pictureTag()` would output and invalid `style` attribute for lazy loaded images ([#400](https://github.com/nystudio107/craft-imageoptimize/issues/400))
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.8",
"version": "4.0.9",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 3 additions & 0 deletions src/models/OptimizedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ 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($this->variantSourceWidths, SORT_NUMERIC);
foreach ($this->variantSourceWidths as $variantSourceWidth) {
$match = false;
switch ($comparison) {
Expand Down
2 changes: 0 additions & 2 deletions src/services/OptimizedImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,6 @@ public function encodeOptimizedSVGDataUri(string $uri): string
$replacements = [
// remove newlines
'/%0A/' => '',
// put spaces back in
'/%20/' => ' ',
// put equals signs back in
'/%3D/' => '=',
// put colons back in
Expand Down

0 comments on commit 40dd097

Please sign in to comment.