Inline CSS to prevent image lightbox (per image)

AI-generated summary

jord8on is looking for a way to prevent the image lightbox from appearing on specific images, while still allowing it on others within the same post. This is because some images, like small screenshots or large header images, don’t need to be expanded. jord8on asks if there’s an <img style> that can be used to prevent the lightbox from appearing on certain images. Additionally, jord8on wonders what the threshold is for smaller images that don’t expand to the lightbox view. maiki suggests checking the site settings for image handling options. jord8on provides an example post and asks if it’s possible to use inline CSS to make the YouTube thumbnail image non-clickable.

There are times when I love that users can click on an image to expand it. This is especially great when someone uses an image in a post and makes it rather small, just to add a touch of flair to a blog post or some other topic. Another example where this is great is for displaying a screenshot, in the topic description, rather small, but the viewer can click it to expand the image.

Sometimes, in the same post, I may use a large image as a header to a topic, but there’s no additional value in clicking it to see the exact same image, so I would want to prevent the image lightbox from being available when hovering over/clicking an image.

Is there a that I can tack on with an image to prevent it from being opened to the lightbox view?

Also, sometimes I’ve noticed that smaller images will naturally not expand to the lightbox view. What is the threshold where a lightbox preview will not be available for an image?

There are so many options for how images are handled, I recommend visiting, /admin/site_settings/category/files?filter=image. Then you can ask what specific options do. :slight_smile:

Thanks for the reference here.

Take a look at this post for example.

Is there a way I could make that YouTube thumbnail, by using inline CSS (in the markdown editor) to prevent that image from being clickable?