SOLVED

Image Column in List

Brass Contributor

I have a SharePoint list that I have been using for probably 2 or 3 years.

It is an Image Column.

Typically when I add the url to the picture in the list int he column it shows the picture.  For some reason when I checked today it is showing the url instead of the image, even though nothing has changed, the column is still set as an image column?  Did microsoft break something again with SharePoint?

 

Anything I can do to get it to show the image again?

 

Thanks,

Terry

 

6 Replies

@Mattw112 it's working on my lists. As a check, go to your list settings and make sure the "Format url as" is showing as Image and that someone hasn't changed it to hyperlink.

 

formatURLas.png

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Hi @Mattw112  i'm seeing the same behavior on my SharePoint list.

 

My guess is, Microsoft changed the the column type to url only

 

lthiers_1-1652959532510.png

 

 

and added a new column type image:

 

lthiers_0-1652959469356.png 

A bummer for me, because now i have to recreate all the images in my lists. :sad:

 

Update: the quality of the images is now unusable. Just a blurry mess. :cry:

lthiers_0-1652963843056.png

 

best response confirmed by Mattw112 (Brass Contributor)
Solution

Hello @Mattw112 

 

you can use an column formatting on the picture column so you can show your picture instead of the url.

 

Try this:

 

{
"elmType": "a",
"attributes": {
"href": "@currentField",
"target": "_blank"
},
"children": [
{
"elmType": "img",
"style": {
"width": "150px"
},
"attributes": {
"src": "@currentField"
}
}
]
}
 
Regards, Dave
Thanks for you JSON code Dave.

Do you know if this only works for internal img URLs?
I am trying to grab the src URL from [$BannerImageUrl] but this only works for relative links (/_layouts/15/images/...) but not for HTTPS links.

As I am using MS stock images for my thumbails, most values in the ImageBannerURL property refer to e.g. "https://cdn.hubblecontent.osi.office.net/m365content/publish/...."

For these entries, I only get the broken image icon

@SvenSH 

 

If you are using external images, those might not work with SharePoint JSON formatting.

 

Follow this article to fix the issue of external images with SharePoint JSON formatting: SharePoint Online: External Image URLs not working in JSON Formatting 


Please consider giving a Like if my post helped you in any way.

@ganeshsanap 

 

this actually did the trick! At least until I integrated that page view with the "document" web part to one of my sites. After saving, all pictures are broken again (even the ones with the relative link).

 

Guess it's back to hero tiles and manually editing each link and picture again..

1 best response

Accepted Solutions
best response confirmed by Mattw112 (Brass Contributor)
Solution

Hello @Mattw112 

 

you can use an column formatting on the picture column so you can show your picture instead of the url.

 

Try this:

 

{
"elmType": "a",
"attributes": {
"href": "@currentField",
"target": "_blank"
},
"children": [
{
"elmType": "img",
"style": {
"width": "150px"
},
"attributes": {
"src": "@currentField"
}
}
]
}
 
Regards, Dave

View solution in original post