Skip to content

Commit

Permalink
set image widths for different screen sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyautida14 committed Oct 27, 2023
1 parent 3455cea commit f88cec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eleventy.config.images.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = eleventyConfig => {
let formats = ["avif", "webp", "auto"];
let file = relativeToInputPath(this.page.inputPath, src);
let metadata = await eleventyImage(file, {
widths: widths || ["auto"],
widths: widths || [300, 600, "auto"],
formats,
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
});
Expand Down

0 comments on commit f88cec1

Please sign in to comment.