Disable clicking on image web part

Copper Contributor

Is it possible to disable the lightbox when clicking on an image web part that doesn't have a link configured?

 

It's confusing the navigation of the page. a simple switch of hyperlink on/off would suffice.

 

Thanks. 

10 Replies
I have exactly the same problem. Would be great to get a fix on this Microsoft.

YES, this really needs to be able to disable.

A link URL or open image or Don't do anything.

Yes, I am also hoping to see this feature made available.
@JoshSinfield 

Agree. This really needs to be able to disable the click interaction (it is the common use case).

Please add a simple toggle switch to enable/disable image click interaction. Thanks

@twincode The image as a link is a user experience disaster. I've been using the embed web part instead and with an html iframe. It doesn't really work for mobile browsing, but is perfectly crisp on the computer. I typically upload a jpg or png to the site assets folder and set the width and height to the image. I also make my images the exact width of the sharepoint site columns. give it a try.

JaDe_0-1651100697377.png

 

<iframe src="url_to_image" width="1204" height="100" scrolling="no"></iframe>

Someone is working on that already?
its disaster... I am just forced to click on all images as I beleave there is some link but wait... there is nothing... just image.

MS Team... do something about this... there are some standards in WWW and this is not following it.
Found that if I put the same URL as the page the image is on the page kind of refreshes, but does not change the place. Better than the lightbox. **bleep** SharePoint really makes me hate Microsoft. Why provide a product if you are not going to support it properly and make simple enhancements that make it usable.
Agree with the sentiment on this site. Basic usability. Allow images to be clickable or not. Allow them to be linked or not. Also, when an image is a link, give an option to open in new tab or same page. These are basic UX things that MS crapped the bed on.
So I found a solution / workaround...

Step 1: Install this solution
https://www.sharepointdiary.com/2020/09/sharepoint-online-inject-custom-css-to-modern-sites.html

Step 2: Add this line to your custom.css file
div[id*=vpc_CanvasImg] { pointer-events:none !important; }

Step 3: Enjoy your coffee

@itsfelipe many thanks for this solution - it worked a treat!

Just one query: could the custom css be modified somehow to allow links on images for the occasional situation where you do want them? Like when you want to link the image to a webpage or a larger version of itself. With this custom css implemented site-wide, it's no longer possible to add a hyperlink to an image at all. At least not on our tenancy. Any ideas?