Nov 11 2021 02:45 PM
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.
Dec 07 2021 05:29 AM
Dec 20 2021 08:09 AM
YES, this really needs to be able to disable.
A link URL or open image or Don't do anything.
Jan 27 2022 08:04 AM
Yes, I am also hoping to see this feature made available.
@JoshSinfield
Feb 24 2022 12:42 AM
Apr 27 2022 04:05 PM - edited Apr 27 2022 04:06 PM
@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.
<iframe src="url_to_image" width="1204" height="100" scrolling="no"></iframe>
Jun 16 2022 12:21 AM
Feb 09 2023 11:06 PM
Apr 17 2023 12:58 PM
Jan 21 2024 09:25 PM
Apr 08 2024 01:51 AM
@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?
Jul 12 2024 11:19 AM - edited Jul 12 2024 11:22 AM
here's the simplest workaround:
Jul 15 2024 06:38 PM
Thanks @boomsyd - this is really useful.
Since my last post, I found another workaround for one-off cases where we don't want an image to be clickable but don't want to use the inject css webpart to disable it across the site. We found that using the 'Mark as decorative' toggle on an individual image makes it unclickable as well as removing the alternative text. I'm not sure how long that option/functionality has been in SharePoint Modern. Slightly baffled why we didn't discover it sooner. 🙂