The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hi @Brian Mair,
The modern "Image" Field is expecting a JSON formatted object. We could create an Image class, serialized it and then sent it that way:
Entities.Image imgg = new Entities.Image
{
fileName = "img.jpg",
serverUrl = "https://site.sharepoint.com",
serverRelativeUrl = "/sites/mySite/Shared%20Documents/New Images Upload/img.jpg"
};
string json = JsonConvert.SerializeObject(imgg, Formatting.Indented);
ListItemCreationInformation itmCreation = new ListItemCreationInformation();
newItem = myList.AddItem(itmCreation);
newItem["imageColumninternalName"] = json;
newItem.Update();
cc.ExecuteQuery();
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.