Skip to content

Commit 65d8654

Browse files
committed
enhance images
1 parent 8cdf41d commit 65d8654

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/_11ty/shortcodes.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ const picture = async function (
99
fetchpriority = undefined
1010
) {
1111
const metadata = await Image(src, {
12-
widths: [250, 440, 600, 1024, 1600, 2150],
13-
formats: ["avif", "jpeg"],
12+
widths: [320, 640, 960, 1280, 1600],
13+
formats: ["avif", "webp"],
1414
urlPath: "/img/",
1515
outputDir: "./dist/img/",
1616
sharpAvifOptions: {
17-
quality: 60,
17+
quality: 50,
1818
},
19-
sharpJpegOptions: {
20-
quality: 60,
19+
sharpWebpOptions: {
20+
quality: 65,
2121
},
2222
});
2323

@@ -26,6 +26,7 @@ const picture = async function (
2626
alt,
2727
sizes,
2828
loading,
29+
decoding: "async",
2930
};
3031

3132
if (fetchpriority) {

0 commit comments

Comments
 (0)