Hello all,
Trying to pull images dynamically from a URL at which they are hosted. I have given each map point an ID in the attribute table which corresponds to the ending of the URL for the required image.
For example: point has customID of 1.
I am using the dynamic expression: "www.examplesite.com/wp-content/uploads/date1/date2/" + {ID} + ".jpg"
Expression should pull from www.examplesite.com/wp-content/uploads/date1/date2/1.jpg.
No images are appearing.
To check it wasn't my expression at fault, I set the dynamic expression to just be a string pointing directly to an image (the same image should, then, be applied to all sites) but still no luck.
When I drag the spot in the Experience where the image should be to the URL bar of my browser, it points to: https://experience.arcgis.com/001/experience/www.examplesite.com/wp-content/uploads/2021/02/1.jpg. So, the URL is being parsed/created correctly but is being appended to an Esri AGOL URL for some reason.
Any advice would be greatly appreciated!
Thanks,
Mason
P.S. I also tried directly uploading an image to AGOL, but that link just points to an AWS server which would still face the same problem as described above.
Solved! Go to Solution.
I do not know if this will be an answer for you, but i had the same issue with AGOL back in 2019. You can see it here .
It may have to do with if your URLs have https at the beginning. Once I calculated my URLs to add HTTPS if it wasn't there already, the auto-appending of the URL to my URLs stopped.
I do not know if this will be an answer for you, but i had the same issue with AGOL back in 2019. You can see it here .
It may have to do with if your URLs have https at the beginning. Once I calculated my URLs to add HTTPS if it wasn't there already, the auto-appending of the URL to my URLs stopped.
That did it! Thanks, Kara.
I added HTTPS but that resulted in a certificate issue - I switched it to HTTP and it is now pulling the images correctly. The only problem is, it is applying the image from the first point to all of them...it doesn't seem to be re-requesting the new image based on the differing ID per site. Any ideas?
Thanks,
Mason
I'd look into the Arcade for attachments. I am in the middle myself of trying to use the list as an attachment viewer and recently posted an idea on dynamically exposing a certain image when a feature has multiple attachments. Someone posted how they accomplished an attachment viewer widget using list and feature info widgets on my idea here
I vaguely recall in my research an ESRI article talking about pulling a certain attachment based on the ID, but I can't tell you where I saw it now. I'd start doing searches on list widgets used for attachments.
Thanks for the advice. I am hoping to keep the existing Experience layout as it is great from a UI perspective. Is there not a way for the image to just pull for each point? The phone number and address is automatically pulled from the attribute table for each point, but the image is stuck with the image of the first site despite me assigning a dynamic query. Any further thoughts? Does this functionality just not work with images, for some reason?
Can you post your expression?
Yes, it's:
"http://www.website.com/wp-content/uploads/2021/02/"+ {JRA_ID} + ".jpg"
JRA_ID is an integer number ID given to each site within the attribute table. 1...2...3...etc. The images are stored at this URL with the ID and .jpg file type appended e.g. 1.jpg...2.jpg...3.jpg...etc.
Thanks for your help.