from arcgis.gis update_thumbnail not making it to HUB

02-27-2024 04:08 PM
Labels (1)
New Contributor III

I want to use the arcgis api for python to update the thumbnails of our highest viewed HUB items that are displayed on our ArcGIS Hub's landing page. The cards for the items make it to the display by using a tag defined in the Hub card properties. The parameters for this page component are set to use the thumbnails of the items as they appear on AGOL.

We've been using the OverwriteFeatureLayer function to do monthly updates of the items which wipes out any thumbnail info that wasn't part of the original service definition at the time the item was published. As such, we want to remedy this by running a follow up script using the arcgis.gis.Item.update_thumbnail command to restore the thumbnail from a locally stored .jpg file.

I was able to run the code and successfully update the thumbnail on the item's overview page on AGOL but it doesn't make it's way to Hub. Instead there is a generic image of icons (page, image, and spreadsheet). The tag is still with the item on the item details section that Hub uses to bring in the link and thumbanil image to the card being used on the Hub site's landing page.


I ran the update_thumbnail command on both the item and it's associated service definition, as well as running it only on the item itself.

from arcgis.gis import GIS, Item
gis = GIS(url = '', username = 'Tommy', password = 'Tutones')

i = Item(gis,'86753098675309')



0 Kudos
0 Replies