Skip to content

Commit

Permalink
chore: use largest image instead for resolveImageOutputPath
Browse files Browse the repository at this point in the history
  • Loading branch information
TrebledJ committed Nov 4, 2023
1 parent 2682d9c commit 6aac46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eleventy/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ module.exports = function (eleventyConfig) {
const file = resolveResourcePath(page, src);
const { ext, options } = getOptions(file);
const metadata = eleventyImage.statsSync(file, options);
return metadata[ext][0].url;
return metadata[ext][metadata[ext].length - 1].url;
});

// Eleventy Image shortcode
Expand Down

0 comments on commit 6aac46e

Please sign in to comment.