Is there a way to insert an image without wrapping it in a clickable lightbox?
I think small images are not clickable:
This only seems to be a issue with large images:
Is there a way to insert an image without wrapping it in a clickable lightbox?
I think small images are not clickable:
This only seems to be a issue with large images:
I thought disabling responsive post image sizes
and create thumbnails
would do the trick, but apparently not.
This is what I see:
Hello,
I think thumbnails are generating by max image width
and max image height
by default. If the uploaded image smaller than these values, thumbnail will not creating.
If you want to disable thumbnails creation, uncheck this settings. It will only disable thumbnail for the future uploads, no matter how big is the image.
I didn’t find any relevant information about that how to disable thumbnails from older uploads but if enough to you to hide these with simple CSS. This workaround might work.
Common / CSS
.cooked {
.lightbox-wrapper {
a.lightbox {
pointer-events: none; // Disable all click events on image
&:hover {
box-shadow: none;
}
.meta {
display: none;
}
}
}
}
Thanks, that works great. Are lightboxes used anywhere else or only on images? I’m afraid that might cause problems elsewhere.
I think .lightbox
is only used for post image thumbnail but I updated the code above to be more specific.
Hey @Nacho_Caballero, I think I found a possible (better) solution.
I checked it again and unfortunately the thumbnail creating even if I disable it on settings. I don’t know actually how because first time it worked for me.
But as I mentioned here
I think if you increase these values, thumbnail could be disable on older uploads too.
I increased these to 99999
a high number and it prevents creating thumbnail under these value.
On older posts you can use Rebuild HTML or rebake posts (will change it on all posts) to remove thumbnails.
cd /var/discourse
./launcher enter app
rake posts:rebake
I think you just need to rebake those posts. Rebake all posts matching a pattern
First I thought that too, but didn’t work. Actually only this How to prevent an image from being clickable (remove lightbox) - #6 by dodesz worked for me to remove thumbnails. I think maybe the max image width
and max image height
is override the create thumbnails
setting.