If I output as JSON and reuse it, each file is hundreds of KB. It will consume too much space if there are a lot of images to be generated in production.
I think the problem is because outputting as JSON will generate too much duplicate information(every stroke's information etc.)
The necessary information is the position, size, rotation, etc... of each element. If we can only output this data and reuse it by rendering the actual SVG file with it, the size of each image will go down to less than 1KB.
If I output as JSON and reuse it, each file is hundreds of KB. It will consume too much space if there are a lot of images to be generated in production.
I think the problem is because outputting as JSON will generate too much duplicate information(every stroke's information etc.)
The necessary information is the position, size, rotation, etc... of each element. If we can only output this data and reuse it by rendering the actual SVG file with it, the size of each image will go down to less than 1KB.