ArcGIS Online - Feature Attachment Image in Popup

23126
8
Jump to solution
05-31-2016 09:15 AM
MichaelKnapp
Occasional Contributor

Hi there -

A feature service with feature attachments will display the attachments as a hyperlink, like this:

But, I'd like to use the attached JPG to display the photo inline in the popup, like this:

I know I can do this by uploading the images separately and setting them up in the "Configure Pop-up" window, but that seems kind of redundant (having the images in the Feature Service, as well as uploaded separately).

Is there a way to directly display a feature attached image in the popup?

Thanks.

1 Solution

Accepted Solutions
BenjaminMittler
Occasional Contributor III

I think you can create a new field in a layer and set the value of that field to the img url. In AGO you can then direct the popup manager to pull the image from that field.

... this may be more difficult than uploading separately depending on how many features you have. 

View solution in original post

8 Replies
BenjaminMittler
Occasional Contributor III

I think you can create a new field in a layer and set the value of that field to the img url. In AGO you can then direct the popup manager to pull the image from that field.

... this may be more difficult than uploading separately depending on how many features you have. 

MichaelKnapp
Occasional Contributor

Thanks for the quick reply Benjamin....we only have 40 points, so this workaround was perfect for us.

0 Kudos
NataliArslan
New Contributor

I have the same problem. I'm collecting photos via GeoForm. I can see the feature attachments in ArcGis Online but I dont think I understand what it means to create another filed in the layer. Even if I create this field, I think I dont know what to do after.

Can someone please help.

0 Kudos
BenjaminMittler
Occasional Contributor III

Hi Natali, 

You need to open the layer in an ArcGIS online map and open up the attribute table. On the top right you can click options and then add a new field. 

I cant remember if when I wrote this you were able to use the calculate field tool to copy over the img URL to the new field or if you had to input them by hand. 

Regardless, the methodolgy found here is what i recommend using:https://community.esri.com/docs/DOC-7445-show-attachments-in-web-map-popup 

The problem with survey123/Geoform is that you want the img to pop up when you take a new point and not have to open up the map and recalculate the field every time. I used the script found in the above post and set my computer to run it as a task every day. This way images for new points are created automatically once a day. 

NataliArslan
New Contributor

I tried to run the python script however as I'm currently on an OSX environment I can't import arcpy. I will try it on a windows and see how to proceed after running the script.

Thank you for your answer.

0 Kudos
aam
by
Occasional Contributor

How would you do that if you have multiple attachments, I have images, pdf files, and some videos linked to each feature. I am able to show the attachments in the popup but not as thumbnails.

AdrianWelsh
MVP Honored Contributor

Michael,

There is an "idea" for this. Please vote the idea up for it to get more consideration:

https://community.esri.com/ideas/9669

MichaelKnapp
Occasional Contributor

Done, thanks Adrian.

0 Kudos