I have a SharePoint list with a column that only accepts images called Photo (SharePoint Online environment).
I'm trying to add a new image to each row programmatically, but so far I've had no luck.
My idea was to use the PnP Powershell module, as it seemed like the logical approach. There's this cmdlet called Set-PnPListItem and the parameter -Values
has an interesting line in the documentation:
From that I tested it by running the following line:
Set-PnPListItem -List "<list-name>" -Identity 1 -Values @{"Photo" = "<random-google-photo-url>"}
The identity 1 corresponds to row that already has an image that I uploaded manually via the normal SharePoint interface. Running this should have had in theory changed the image to the random one I passed as value in the hashtable, but in fact I got this error instead:
I'm not too familiar with SharePoint architecture. Am I missing something? Is there an easier way to this (perhaps via API)?