The colorbox module has an option to set the lighbox size to x percent of the browser window, however the Media Gallery ignores that. Is there any other way of getting it to size the lighbox to that or is it only possible to use File Styles?

CommentFileSizeAuthor
#9 media_gallery_colorbox_resize.jpg109.53 KBUrmasZ

Comments

ao2’s picture

@tsvenson: are you referring in particular to images inside the colorbox?

I have found out why colorbox is not resizing large images with media_gallery, but I am not sure this is the same problem you are referring to.

Basically the isImage() test in colorbox code is failing when href is in the form /media-gallery/lightbox/X/Y, and even forcing it to true won't work as that URL returns some generated HTML which is just put into the lightbox as is.

Tragy’s picture

ao2, have you found some quick fix for this problem?
I'm having a similar issue with large images, all my vertical images are cropped to 900px of height, I've searched for a hard-coded property to adjust this but had no luck.

secondgig’s picture

I just managed to fix the height issue that you refer to ao2 and Tragy by setting the width and height of the image within the colorbox to a set width and height , not the best of solutions but now the height works properly .

colorbox's own support suggests that the issue is because the image isn't loading before the colorbox decides on the width and height for the modal , they also state making sure the image has a width and height attribute is a workable fix or setting the width and height of the image within css as I've just stated.

TribalMan’s picture

subscribe

harald_’s picture

subscribe

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

@tsvenson Have you been working more with this?

tsvenson’s picture

@lsolesen: Sorry no. Haven't actually used the module since I moved to Media 2.x and found it it wasn't working with it.

selinav’s picture

Where do you change/pass the height and width value?

UrmasZ’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new109.53 KB

What more info maintainer needs? There is enough information about this problem. Image is scaled to 900x900(default), but screen height is 760px and browser takes some room also. So viewing area height is 700px for example. If I open image on Colorbox, it should be resized from 900x900 to my browser's actual size, but it is not happening. This means that opened image does not fit into my screen. It forces me to scroll.

We need automatic resizing!

Changing scaling values is not solution and I do not want to use different lightbox.

lsolesen’s picture

Thanks for your answers. You are more than welcome to provide a patch to fix this issue.

ivnish’s picture

Issue summary: View changes
Status: Active » Closed (outdated)