Our environment(in case it matters): Windows Server 2016 Standard, ArcGIS Desktop 10.6.1, SQL Server 2017 Standard, Python 2.7
We have an enterprise SQL Server geodatabase functioning as a read-only library of GIS data that is refreshed nightly with changes from a versioned geodatabase. When a feature class is updated, the feature class is replaced in the library geodatabase and metadata must be recreated for it there. We have lots of user created metadata for each feature class that is maintained in a SQL Server table. After the feature class is replaced in the library geodatabase we export the auto-generated metadata on the updated library feature class to an xml file, modify the exported xml with values from our metadata table, and import it back into the library feature class.
I've worked through the python code needed to do all that but I'm stuck on the issue of getting the thumbnail images from a folder of regularly updated jpeg files into the xml file for export to the library feature class metadata.
Can anyone please help with how this can be done programmatically without manually using the metadata editing tools in ArcCatalog one at a time. We refresh over a hundred feature classes every day.