feat: 🔧 add compressor config options
This commit is contained in:
parent
929d9cf8a4
commit
796619d22b
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,8 @@ export default async function (eleventyConfig) {
|
|||
extensions: 'html',
|
||||
formats: ['avif', 'webp', 'auto'],
|
||||
widths: [640, 800, 1280, 1920, 2560, 3840, 'auto'],
|
||||
sharpJpegOptions: { mozjpeg: true, optimiseScans: true, quality: 95 },
|
||||
sharpPngOptions: { compressionLevel: 9 },
|
||||
urlPath: '/img/',
|
||||
outputDir: './public/img/',
|
||||
defaultAttributes: {
|
||||
|
@ -112,6 +114,8 @@ export default async function (eleventyConfig) {
|
|||
eleventyConfig.addShortcode('bgimgset', async (src) => {
|
||||
const imgset = await Image(src, {
|
||||
widths: [1920, 2560, 3840],
|
||||
sharpJpegOptions: { mozjpeg: true, optimiseScans: true, quality: 95 },
|
||||
sharpPngOptions: { compressionLevel: 9 },
|
||||
formats: ['avif', 'webp', 'auto'],
|
||||
urlPath: '/img/',
|
||||
outputDir: './public/img/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue