splitbrain / dokuwiki-plugin-gallery

Creates a gallery of images from a namespace or RSS/ATOM feed in DokuWiki
http://www.dokuwiki.org/plugin:gallery
GNU General Public License v2.0
21 stars 24 forks source link

Some thumbnails are displayed incredibly small #187

Open Zichqec opened 10 months ago

Zichqec commented 10 months ago

I can't work out why, but for some reason, some of my galleries are displaying thumbnails incredibly small instead of at the size I specified. The images in question are larger than the max 200 x 200 px I specified, yet for some reason, the gallery thumbnails are displaying at less than 100 x 100 px. And it's only on some pages and not others.

I thought it might be the table we have floating on the right side, but I tested removing it and the gallery is still tiny. Here is an affected page.

image

I also am having issues with scaling elsewhere that I wonder if might be related. I have a little wrap box with some text, and I was hoping to place a gallery with a single image in it (since dokuwiki on its own can't downscale an image based on the height), and at normal sizes it looks fine, but when zoomed in or on a mobile device, the thumbnail becomes incredibly tiny, even though it looks like there is plenty of space in the box for it. As this is a test, I don't have a live page with this to link, but the code is like this:

<WRAP half column box round>
===== Placeholder =====
We're not sure what to put here just yet, but the page looks weird if this space isn't filled!

{{gallery> ghost:lulo:appearance.png?1000x1000}}

[[admin:Import Test]]
</WRAP>

And at normal sizes it looks like this image

While zoomed in/on mobile it looks like this image

Maybe there's something I'm doing wrong, but I'm not sure. If I am, any pointers on how to get this to behave better would be appreciated.

splitbrain commented 10 months ago

The issue seems to occur when you left/right align the gallery but use the responsive mode. I'm not sure how to fix this and if it needs fixing. Either not align the gallery or provide the number of columns. I believe either option should fix the behaviour.

Zichqec commented 10 months ago

Ah, I hadn't spotted the bit on the page that said the number of columns should be specified if you use the alignment options. That's my bad.

After I updated the plugin before, all of the existing galleries on our wiki started displaying one image per row, and it made the galleries unusable. So I set it to 5 across the whole wiki, which was how we had it with the previous version. I'm not sure if that behavior should have happened, looking back?

Anyways, after updating today I am able to do this correctly and the image is now at the proper size. I'm at a bit of a crossroads though; our template is quite a bit wider than the dokuwiki default, so to me the images are uncomfortably large with the responsive mode. However, if I use left alignment as I had been, now some of the galleries will have to be manually adjusted based on the number of items in them, which isn't ideal.

I think the responsive mode is also ignoring that I have thumbnails set to display at 200x200... is that setting supposed to apply to responsive mode? I don't see it mentioned on the docs. I think if I could set either a maximum thumbnail size, or a maximum width for the whole gallery section, that would resolve this for me. I guess ah... really the problem is, the default dokuwiki template has restricted content width built into it, so of course the gallery section looks fine. But not all templates do, and on those ones, viewing the wiki at larger sizes causes the thumbnails to be large and awkward. See:

image

In the responsive mode, if I want to see all thumbnails in a gallery with 3 rows, I have to scroll such that the gallery section fills my entire screen.