Forum Discussion
Render issue with SVG images in AdaptiveCard
Balasubramaniam_M , remisauvat - We recently got update from engineering team that,
SVGs are not supported because they pose a security risk, we had to work to close that gap. Developers are encouraged to use PNGs and JPGs, as stated in the documentation. Types of cards - Teams | Microsoft Learn
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
Prasad_Das-MSFT - No offense intended to anyone but simply not supporting SVGs is short sighted. I understand and appreciate there can be security risks involved, but there are still ways to support the drawing functions without the security risk functions. SVGs are smaller, completely scalable and lossless unlike JPGs and PNGs (is WebP fully supported yet?). There are ways to load SVGs with vulnerability in mind, most simply to load as an html with an <img> tag pointing to the svg so that JavaScript, CSS and other embedded XML is not processed or by stripping out the script and only loading the draw portions. SVG is part of the set of standard image formats across the Internet and continues to grow in adoption for site content with good reason. It is not going away and it serves a very specific need and use case (vector images). Is there a parallel effort to create a wrapper or module that can process SVGs both for the previewer in Teams and tiles?
- Prasad_Das-MSFTMay 27, 2024
Microsoft
e4jfb - Thanks for sharing your valuable feedback and we completely understand your concern. We will share this feedback with engineering team for consideration.