Sure! Take a look at the Arcade docs: https://developers.arcgis.com/arcade/guide/types/#attachment
When we call an individual item from our array of attachments, it will have an ID. When you enable attachments on a feature service, they get their own table in your datastore, and the ID column is essentially the objectid of the attachment.
You can see this in the REST directory of a service with attachments:
Linking directly to an attachment follows the format <service-url>/<layer-index>/<objectid>/attachments/<attachmentid>
Like this:
https://maps.co.kendall.il.us/server/rest/services/Hosted/CAMA__query_/FeatureServer/0/46656/attachm...
In order to get the src tag for our HTML, we'll need the ID, as it is part of the direct URL to the file.
When that URL is piped into a popup, you get the picture!
In the expression I wrote, you'll end up with an array of <img src="the_url"> strings, and concatenating them with <br> will give you a scrollable series of images in your popup.
In order to have Arcade-generated HTML honored by the popup, you need to use an Arcade popup element, and put the result in something like this:
return {
type : 'text',
text : Concatenate(urls, '<br>')
}
- Josh Carlson
Kendall County GIS