Working on a specific list that contains images as attatchments. How could I display them as image in infopath or list it self? Currently getting it as a link. I need it to be as a image for report purposes


By using below steps you can set image in your out of the box List.

1.Create "Picture" type Column in your list.

2.Create one Event Handler with ItemAttachmentAdded event like below:

public override void ItemAttachmentAdded(SPItemEventProperties properties)


           SPListItem item = properties.ListItem;
           //SPAttachmentCollection attach = item.Attachments;
           string attachmentUrl = item.Attachments.UrlPrefix + item.Attachments[0];

           item["PictureFieldName"] = attachmentUrl;


Now, just add item with attachment and you will see attached image in Picture Column field.

similar issue post for your reference:


  • Yes, that is my post. Creating a multiple line collum helped me with inserting the picture. Would it be possible to do it automatically when attachment was added? – Lukas Šliužas Jan 31 at 6:43
  • Would it be showed as image? – Lukas Šliužas Jan 31 at 8:19
  • 1
    It cannot be automatically displayed as an image when attachment was added. – Lisa Chen MSFT Jan 31 at 8:40

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.