Config options
assetsDir
Assets directory path
- Type:
string
- Default
"/src/assets"
formats
Image formats to convert to
- Type:
ImageFormat[]
- Default
['avif', 'webp']
formatOptions
Options for each format. This plugin using Sharp
behind the scene. Check the documentation for more detail about the different output options.
avif
- Type:
AvifOptions
- Default
ts{ quality: 70, effort: 4, chromaSubsampling: '4:2:0' }
- Type:
webp
- Type:
WebpOptions
- Default
ts{ quality: 90, effort: 4, smartSubsample: true, nearLossless: false, }
- Type:
jpg
- Type:
JpegOptions
- Default
Sharp default
- Type:
png
- Type:
PngOptions
- Default
Sharp default
- Type:
removableExtensions
Remove files with these extensions when the conversion finishes
- Type:
ImageFormat[]
- Default
[]
batchSize
Number of concurrent image processing tasks
- Type
number
- Default
4
enableScaledVariants
Generate scaled variants based on the highest-resolution image
- Type
boolean
- Default
true
enableLogs
Log generated files to the console
- Type
boolean
- Default
false