Skip to content

Commit

Permalink
Fixed an issue where too many alternatives would be generated
Browse files Browse the repository at this point in the history
When using naming conventions to generate image alternatives, this
patch would previously generate a “@1x” alternative if one didn’t
exist. That’s no longer the case
  • Loading branch information
fredrikekelund committed Oct 5, 2016
1 parent 7efd55d commit 07c9591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function __construct($path)
$alternatives = $types['alternative'];
$max = max(array_keys($alternatives));

for ($i=$max; $i > 0; $i--) {
for ($i=$max; $i > 1; $i--) {
if (isset($alternatives[$i])) {
continue;
}
Expand Down

0 comments on commit 07c9591

Please sign in to comment.