Skip to content

Commit

Permalink
make resize images progressively load
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjamuffin99 committed Sep 25, 2024
1 parent 9238535 commit b329a5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ module.exports = function (eleventyConfig) {
let metadata = await Image(resizedImage, {
formats: ["png"],
outputDir: "out/img",
sharpPngOptions: { progressive: true}
});

let imageAttributes = {
Expand Down Expand Up @@ -145,10 +146,6 @@ async function resizeImage(src, width, height, mode) {
width: width,
height: height,
fit: mode,
options: {
kernel: "nearest",
fastShrinkOnLoad: false,
},
})
.toBuffer();
}

0 comments on commit b329a5b

Please sign in to comment.