I want to put an svg file to an image component and in the site is visualized , but ... on the final app no ! Also in companion . Are there solutions ?
Thanks , Gino
The image component can not show a SVG as far as I know. You have to use a webviewer or an extension for this.
I'll try , thanks .
Yep , I know it can be loaded with WebViewer but there are zoom in and zoom out buttons etc. , plus the "image" cannot be clicked ( I want a button with the svg but the image component is also good because it has the command " when cliked " )
I will log this as a issue!
SVG files are not like image files (PNG, JPG, WEBP, BMP), they are vectors (little bit like DXF). It's not an issue that they can't be viewed in an image component, it's a case of 'it would be nice'.
Hello Gino - are you actually using the SVGs as they were intended or do you just want them to work like other image formats? If the latter is true, your best bet would be to convert the SVGs into either PNG or WEBP.
Made a PR that would allow Canvas, Sprites, and Image Components to support SVG files.
You can try it out or I’ll let you know if this PR gets into ai2-test
Yes , thanks , I did it . I wanted just SVGs because of the reason to not lose quality on big screens .
Thanks , I will see and reply
If you use PNG, it would be on an enormous screen to noticeably lose quality. Concerning the quality of SVG, that's only really at it's best for line drawings - SVG files that look like pictures need to start large and be scaled down to be at their best, which is a general rule for all formats.