Image Widget that accepts .SVG files?

996
3
Jump to solution
03-28-2022 10:28 PM
FredericPoliart_EsriAU
Occasional Contributor II

Hi,

I would like t know if there is a method or a widget to display Images that would accept .SVG format?
At the moment (as far as I know), the default ExB Image Widget only accepts ONG, BMP, JPEG formats. 

Has anyone done an image widget for SVG files?

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Regular Contributor

@FredericPoliart_EsriAU,

Due to the security facts (XSS vulnerability & lack of sanitization for SVGs), we have removed the support for SVG (& SVGZ) files since AGO 8.4/Enterprise 10.9/Dev 1.3. Thus, there is no way you could use the OOTB ExB functions with SVG uploads now.

View solution in original post

0 Kudos
3 Replies
TonghuiMing
Esri Regular Contributor

@FredericPoliart_EsriAU,

Due to the security facts (XSS vulnerability & lack of sanitization for SVGs), we have removed the support for SVG (& SVGZ) files since AGO 8.4/Enterprise 10.9/Dev 1.3. Thus, there is no way you could use the OOTB ExB functions with SVG uploads now.

0 Kudos
FredericPoliart_EsriAU
Occasional Contributor II

OK so in theory, I could create my own SVGImage Widget by 
1. Cloning your \client\dist\widgets\common\image\  
2. adding a new setting called "svg_data" 

FredericPoliart_EsriAU_0-1652944233674.png

.. or is it easier to just upload the .svg somewhere public , and use the <embed> widget 🙂 



0 Kudos
jcarlson
MVP Esteemed Contributor

The Embed widget allows you to embed by Code, not just by URL. Simply paste your <svg>...</svg> code there.

jcarlson_0-1652964246931.png

 

 

- Josh Carlson
Kendall County GIS