Popup image hyperlink blocked

1146
3
09-01-2020 06:02 AM
SantoshV
New Contributor II

I have developed a web application which has a identify tool where when a feature is clicked it pop-ups an image, I am calling this image using a hyperlink, but unfortunately in the production environment due to some security requirements, group policy blocks hyperlinks, therefore neither the thumbnail nor the full-size image is currently operable, I need to find a workaround for this to show the image without using a hyperlink.

Will storing the image in a Geodatabase and then fetching it work, or can anyone suggest an alternative?

0 Kudos
3 Replies
Egge-JanPollé1
MVP Regular Contributor

Hi Santosh V,

You may consider to store the images as attachments with the feature layer. And use Arcade to show the images in the popup.

See this blog by Jennifer Bell‌:

https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2019/03/22/show-attachments-in-po... 

By default, the attachment is shown in the pop-up as a hyperlink. With just a few lines of Arcade Expressions, you can configure the pop-up to display the actual image without requiring your viewers to click on the link.

HTH,

Egge-Jan

JenniferBell1
Occasional Contributor

Thanks for pointing the blog which works nicely with the current map viewer. There's a new map viewer beta that is now available in ArcGIS Online that automatically shows attachments as images in the pop-up so no need to click on a hyperlink. Here are a couple of blogs I recommend to get you started:

Alternatively, you could also host the images in ArcGIS Online and point to the image url in the pop-up (assuming that the ArcGIS Online image url is not blocked by the group policy). Best of luck!

VictorTey
Esri Contributor

Santosh V Another alternative is to encode the image in base64 string and you can directly display that in any img tag.