getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[lightbox-gallery] Lightbox is truncated instead of scaling. #326

Open Artiom-M opened 1 year ago

Artiom-M commented 1 year ago

This is most visible on vertical photos, when inside lightbox the image is scaled horizontally, but truncated vertically.

Gallery is created using shortcodes:

[lightbox image="DSCF8120.JPG" gallery="gallery1" class="inline-block" width="1200" height="1200"]
![](DSCF8120.JPG?cropResize=512,512)
[/lightbox]
[lightbox image="DSCF8025.JPG" gallery="gallery1" class="inline-block" width="1200" height="1200"]
![](DSCF8025.JPG?cropResize=512,512)
[/lightbox]

Screenshot_20221217_150410

rhukster commented 1 year ago

Try cropZoom rather than cropResize On Dec 16, 2022 at 23:27 -0700, Artiom-M @.***>, wrote:

Assigned #326 to @rhukster. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.Message ID: @.***>

Artiom-M commented 1 year ago

Changing to cropZoom here DSCF8120.JPG?cropResize=512,512 just makes my thumbnails as ugly as this lightbox view. So I would suspect I need to tell lightbox to do cropResize instead.

rhukster commented 1 year ago

Image media handling (cropZoom, cropResize, etc) are not smart enough to know where to crop, you need to tell it how. usually a square is a good way to cropZoom ad it should keep things in the middle.

Full list of available options: https://learn.getgrav.org/17/content/media

Artiom-M commented 1 year ago

Actually I don't want to cropZoom. I want cropResize for the thumbnail. Also thumbnail is not a problem. What I am reporting here is that inside the lightbox full size image is truncated. As you can see on the picture.