jonathanheilmann / ext-jh_photoswipe

Adds PhotoSwipe to TYPO3 CMS
4 stars 5 forks source link

Thumbnails not resizing #35

Open LlGC-szw opened 6 years ago

LlGC-szw commented 6 years ago

Just installed the latest version on TYPO3 7.6.29 and the images aren't resizing for the thumbnails (multi thumbnail view).

Tried setting 'Max width of preview' to 60px but that has no effect either.

jonathanheilmann commented 6 years ago

Did you set 'Max width of preview' to 60px or 60? Actually 60px won’t work as an integer is expected, but is not validated as one. This is a bug, indeed.

LlGC-szw commented 6 years ago

I have tried both 60 and 60px in 'Max width of preview' and 'Max height of preview' fields, neither affect the thumbnails displayed.

jonathanheilmann commented 6 years ago

Do you have a non-working example I may have a look at?

LlGC-szw commented 6 years ago

I've added a few images and some caption text into https://www.library.wales/index.php?id=6813

The settings are: Max width of preview = 60 Columns =3

Can't change the default css using TS either but I'll log that as a separate bug.

jonathanheilmann commented 6 years ago

Thanks for this example, I’m going to have a deep look at this on next monday.

LlGC-szw commented 6 years ago

Thank you. Happy to test anything on our dev server and give you feedback. I'll also add the TS problem I've found.

jonathanheilmann commented 6 years ago

I've done some (larger) investigations at this issue and maybe there is a simple solution: It looks like jh_photoswipe does not work with image layout key srcset as used in your case. A workaround could be this singe TypoScript Setup line:

lib.tx_jhphotoswipe.multiThumbnail.cssStyledContent.1.layoutKey = default

Another solution would be, to copy your local sourceCollection into jh_photoswipe´s sourceCollection lib.tx_jhphotoswipe.multiThumbnail.cssStyledContent.1.sourceCollection

LlGC-szw commented 6 years ago

We haven't specified the image layout in our template, only for specific bespoke extensions we've created. For all other extensions, images are as the extension or default TYPO3 settings dictate. As you can see images for all breakpoints are the same with no alternative source specified:

I've added the TS to the setup file and there seems to be no difference in thumbnail generation.