Skip to content

Commit

Permalink
Merge branch 'release/5.0.2' into v5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jun 19, 2024
2 parents 67d3fde + ddf20cc commit 8bbba2f
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

## 5.0.2 - 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))

## 5.0.1 - 2024.05.09
### Fixed
* Fixed an issue where field content was not propagated to other sites on multi-site installs, causing missing images
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": "5.0.1",
"version": "5.0.2",
"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 @@ -429,8 +429,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 8bbba2f

Please sign in to comment.