How to show images in popups

5378
11
07-03-2019 06:43 AM
by Anonymous User
Not applicable

Good day,

I'm trying to add a link to an image in a popup from a web map service I published. I have a feature class with images added to the attribute table. I've published this feature class but I don't see the picture field in the attribute table. When I configure the popups, I can see the picture field and I added it to the popup, but nothing is displayed. I found several articles on how to show an image in a popup, but they require that you already have links to the images already working. I haven't even been able to get that far. Any suggestions would be much appreciated!

0 Kudos
11 Replies
Katie_Clark
MVP Regular Contributor

Hi Chris,

Where are the images stored/hosted that you are trying to display?

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
by Anonymous User
Not applicable

Hi Katherine,

Thank you for your reply. They are stored in the attribute table of the feature class that I published to our ArcGIS Server 10.6.1. I believe the images are called feature attachments when they are added directly into the attribute table. I took a screenshot of this and attached it to my post above. The image is called picture_field.jpg.

0 Kudos
Katie_Clark
MVP Regular Contributor

Hmm...I am wondering if this is a feature that is not supported in ArcGIS Online. As you see in the pop-up configuration, it wants a text field that contains a URL (or just a static URL), not one that contains raster data directly stored in the attribute (which I believe is a BLOB data type). If there is a way you can host them on an image server and get a URL that way, then they should display in the pop-up. 

Also, I am curious, once you configured the pop-up to display the Picture field and saved that configuration, did that field appear in the attribute table in Map Viewer?

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
by Anonymous User
Not applicable

Judging off of this: https://www.reddit.com/r/gis/comments/76x62v/how_to_get_arcgis_online_to_automatically/ I think it might be supported. I've tried to contact the person that posted that on reddit, but I haven't heard back. Unfortunately, hosting them on an image server wouldn't be practical in our situation. After configuring the pop-up to display the picture field, that field did not appear in the attribute table in map viewer. I've been playing with something called feature access and feature services, but I haven't had any luck.

0 Kudos
Katie_Clark
MVP Regular Contributor

Interesting...hopefully someone else will respond who can help more! I'll continue to look into it because I'm curious as well. Best of luck!

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Katherine,

Showing images which are stored as attachments in pop ups is something that we are working on for the next version of map viewer. Currently, there are a few workarounds to get this working with the current map viewer.

Check out this blog about an app that shows attachments without additional configuration.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/introducing-attachment-viewer/

Here is a blog that outlines a way to do this with field calculations:

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

Stay tuned as improvements to this will be coming over the next year.

-Kelly

Katie_Clark
MVP Regular Contributor

Hi Kelly Gerrow,

Thanks for your response! I definitely look forward to seeing more capabilities for showing attachments in pop-ups with future updates. 

However, I believe the OP is talking about images that are stored directly in the attribute table, not as attachments. (was I correct that this would be a BLOB data type?)  Is that functionality currently supported, or does it have to be done through a URL in a text field?

Thanks for clarifying!

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Katherine,

The only way that images are stored with features (not referenced via url) is by attachments. Attachments do use BLOB to store the data. for attachments so I think we are talking about the same workflow. Currently in map viewer, you need to refer to the location of the image via url, so this can be configured to point to a location hosted on another website or is an attachment in the hosted feature layer. The attachment viewer does enable you to view attachments without writing a specific url to the location.

Thanks and let us know if you have more questions,

Kelly

Katie_Clark
MVP Regular Contributor

Thanks for the additional info, Kelly!  

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos