️ compress jpegs instead of full quality 1000x1000

This commit is contained in:
Mentor Palokaj 2022-01-14 13:44:37 +01:00
parent b45f6eb3c8
commit 3635ca2d2a

View File

@ -138,7 +138,11 @@ module.exports = async function svgFromAttributes( attributes=[], path='' ) {
document.querySelector( 'svg' ).outerHTML document.querySelector( 'svg' ).outerHTML
].join( '' ) ].join( '' )
const bakedRaster = await convert( bakedSvg, { } ) const bakedRaster = await convert( bakedSvg, {
quality: 80,
height: 500,
width: 500
} )
// Double check that files do not yet exist (in case of weird race condition) // Double check that files do not yet exist (in case of weird race condition)
await failIfFilesExist( svgFile, rasterFile, path ) await failIfFilesExist( svgFile, rasterFile, path )