me
/
ethanreece.com
Archived
1
0
Fork 0
This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
ethanreece.com/astro-imagetools.config.mjs

37 lines
914 B
JavaScript

import { defineConfig } from 'astro-imagetools/config'
export default defineConfig({
placeholder: 'blurred',
format: ['webp', 'jpg'],
fallbackFormat: 'png',
includeSourceFormat: false,
formatOptions: {
jpg: {
quality: 80,
},
png: {
quality: 80,
},
webp: {
quality: 50,
},
tracedSVG: {
function: 'trace',
options: {
background: '#fff',
color: '#000',
turnPolicy: 'black',
turdSize: 1,
alphaMax: 1,
optCurve: true,
threshold: 100,
blackOnWhite: false,
},
},
},
sizes: (breakpoints) => {
const maxWidth = breakpoints[breakpoints.length - 1]
return `(min-width: ${maxWidth}px) ${maxWidth}px, 100vw`
},
})