awslabs / threat-composer

A simple threat modeling tool to help humans to reduce time-to-value when threat modeling
https://awslabs.github.io/threat-composer/
Apache License 2.0
444 stars 52 forks source link

[FEATURE] Allow SVGs for diagrams #84

Closed Pesir closed 7 months ago

Pesir commented 7 months ago

Describe the feature

Allow vector Graphics e.g. SVG files in diagrams.

Use Case

Instead of only allowing jpegs, pngs, etc, also allow svg files. These are usually smaller and allow to scale text and information. And if the product changes and grows makes the very easy to edit since they are not static images.

Proposed Solution

change

accept='image/png, image/gif, image/jpeg'

to

accept='image/*'

in ImageEdit

Other Information

No response

Acknowledgements

jessieweiyi commented 7 months ago

Hi @Pesir , thanks for raising the feature request. Does the image need to be stored as svg format on the platform? As currently, there is an image compression step after the file is uploaded. The SVG file will be converted into png.

Pesir commented 7 months ago

I would save it as an SVG, from what I saw the markdown rendering does support it for export. I would actually think compressing the svg to an png would increase image size. Svg is not pixel based so it only stores the actual shapes. It would also make delta changes so much nicer since svgs can be easily imported into draw.io or similar.

github-actions[bot] commented 7 months ago

:tada: This issue has been resolved in version 1.0.34 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: