mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
⚡️ compress jpegs instead of full quality 1000x1000
This commit is contained in:
parent
b45f6eb3c8
commit
3635ca2d2a
@ -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 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user