SP Library that embeds an image with a link
-
07-01-2021 - |
Question
I am trying to make a library that you would just need to put the image and url in and it would create a hyperlinked image that will display on our site. I feel like I'm really close but I'm missing something. I used these instructions here: Adding an image link via calculated column on a list with HTML directory list solution
Basically creating a calculated column which works great! But...I want to be able to put my own picture there. I tried editing the formula to this:
=IF(ISBLANK([Site URL]), "URL Missing", ("<a href="&[Site URL]&"target='_blank' alt='Open site in new window'><img src=[photo url column]' /></a>"))
But that doesn't do the trick. I'm not sure why it won't work. If you have any suggestions, I'd appreciate the assistance!
Solution
The "photo url column" is a column, so that you need to use the following formula.
=IF(ISBLANK([Site URL]),"URL Missing",("<a href='"&[Site URL]&"' target='_blank' alt='Open site in new window'><img src='"&[photo url column]&"'/></a>"))
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange