0

I am not able retrieve image column from SharePoint list in my solution using sp-pnp-js.

enter image description here

0

Try below code inside forEach:

let imageUrl = item.Picture.Url

OR

let imageUrl = item["Picture"].Url

Then pass this image URL inside src attribute of img tag.

2
  • how to retrieve date column fields from sharepoint list – Davy Aug 6 '20 at 16:10
  • Are you able to retrieve and use image URL using above code? You can get date column using let dateColValue = item.InternalNameOfDateCol OR let dateColValue = item["InternalNameOfDateCol"]. make sure you are using correct internal names of your fields. – Ganesh Sanap Aug 6 '20 at 16:17
0

You could get picture url this way:

item.pictureColumnName.Url

get date column:

item.dateColumnName

enter image description here

0

This worked for me:

JSON.parse(item.ImageColumName).serverRelativeUrl

BUT I was using CAML query to retrieve items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.