Navigating between images within a post

For posts with multiple images, it’d be really nice to be able to navigate between images while in the expanded ‘lightbox’ view (using :arrow_left: and :arrow_right:), rather than having to click out and find the next image within the post.

Specific use case I’m thinking of is ‘I’m a developer looking at a design which is 8 images long. I want to be able to see each of the images in succession, without having to click each one, close it, scroll to the next one, click it, etc.’

26 Likes

Sure that sounds like a nice addition!

4 Likes

Bumping this feature request.

Over at Stonehearth we frequently have users post screenshots from their games, and at the moment, this is done through a variety of means. Some post links to Imgur albums, or other specialized sites, but most simply upload their images directly. Most images are HD or better, which results in them being lightboxed (good), but you have to open each one individually and scroll each time (bad). A better system in core for viewing multiple images would be great.

2 Likes


https://github.com/discourse/discourse/pull/4831

16 Likes

Love this, thanks @gdpelican.

Just one minor observation - on mobile Safari, when tapping arrows, image navigation works well. However, when tapping the image itself, there’s a confusing bug - the image is both advanced and zoomed (so the next image is shown zoomed in). If this image is tapped, the next image is shown zoomed out, and so on…

I know that business hosted sites got a new build pushed yesterday - I would not complain (in fact I’d cheer from the rooftop) if we could get this rolled out early instead of waiting 2 weeks :smiley:.

Hm, that’ll definitely be within the lightbox plugin itself; if you’re interested in a fix you could report the bug on that repo… but it looks like there are a bunch of issues on there already (and not a ton of activity :/)

1 Like

Yikes - I just browsed through all 21 pages of bugs reported on this plugin and didn’t find the zoom/cycle bug.

Is there another lightbox plugin you could use?

That plugin’s been in Discourse for as long as I’ve known about it; the change I made was simply to use some new features they released for it a while back. I’m not personally interested in making a contribution of moving to a new lightbox plugin, but it does seem like a kinda gnarly dependency that could be improved upon.

Thanks for the information @gdpelican

I haven’t looked at the Discourse code, but could it be that Discourse is activating two features of the lightbox plugin that conflict with each other? (“click to zoom” and “click to advance”)? Perhaps we could switch off the “click to zoom” behaviour, and then we’d be home dry?

But that’s not click to zoom…it’s click to view in full resolution. On Stonehearth user’s frequently upload high resolution images. I don’t want to lose the ability to view them in the browser at full resolution just to get a gallery view working.

I think the solution, then, is to allow tap-to-zoom on the image, and only if the user clicks the arrows, advance through the gallery.

So we need to disable click-anywhere-to-advance behaviour provided by the gallery plugin.

Sounds great, but… this (lightboxing/gallery) isn’t a plugin, nor is it code written by Discourse. It’s an external library that Discourse uses. So either:

  1. Someone needs to modify the library is imported into Discourse. This might work in the short term, but could break things if the lightbox library is updated and we try to merge it in.
  2. Someone needs to commit to the lightbox library with a fix, and have it be merge in by the maintainer (who doesn’t seem very active).
3 Likes

Could that be improved for navigating between images within a topic? Would be great if we could cycle through all the images in this topic. :slight_smile:

1 Like

I think that could often lead to confusion. You browse through the images of a post and then…, they just keep coming, but from where? You’d also be glancing over posts that maybe should have been liked, or at least read in full. It might also be difficult to load in images that aren’t yet loaded into the topic.

Would be fine as a plugin but as a core feature it sounds tricky.

4 Likes

Ok, a good alternative would probably be to put all images into one big wiki post then.

Another idea: Have the text that is right below an image displayed in the lightbox too:


I moved the download button and the file info to the top. There is now space at the bottom for an additional description.

1 Like

Yes, I’ve got that idea too. Thanks for sharing… That is something Facebook is doing with photos.

Hello.

Our forum updated today (to 1.9.1)

Now in posts with multiple images, ‘click to zoom’ does not work. It instead goes to the next image in that post.
A lot of users would like to see this feature back returned.

Is there any way to get ‘click to zoom’ back in posts with multiple images ?

(Hope I’m right for asking this here. If not, my sincere apologies)

EDIT: Changed the word ‘threads’ to ‘posts’

1 Like

Anyone any idea, please ?

Have you tested this on try.discourse.org to see if you can reproduce it there?

1 Like