I'm trying to use the Lightbox2 module on my Drupal 4.7 install. The image gallery is working fine without Lightbox but just not elegantly. The images are uploading, the thumbnails are being created, the preview size is being created and the gallery displays properly. However when Lightbox is enabled, when you click on an image to view in the box, it looks like it uses the original image size. You only see a fraction of the image with scrollbars on your browser window. I can't find a setting to change the image size that Lightbox wants to display. Any one encountered this? Thank you, Dave

Comments

morphir’s picture

Could you provide with a actuall link?

It's easier to see the problem then..

morphir.com

dabro’s picture

This is a link to my test gallery:
http://www.fbclawton.com/drupal/image
Click on the gallery and you will see the large image, thanks, Dave

morphir’s picture

ok, so the thing is that you will have to resize the image to the size you would like to present it. Clearly its a bit too big now. But use photoshop, fireworks or whatever editor you prefer and I think you will get what you are after. EG. try 800x600

Apperantly the Lightbox2 dont support resizing. Or? (I haven't tested the module yet that much)

morphir.com

dabro’s picture

ImageMagick creates several different sizes, a thumbnail, and a preview. It would seem i just can't get the lightbox to display the correct one instead of the original. As an aside, the "meta" theme includes the lightbox function in itself, the "meta" theme lightbox functions perfectly when you're using the "meta" theme. I just have some issues with the style of the "meta" theme and was trying to implement the lightbox using a different theme. I guess I'll have to keep digging, thanks, Dave

bugz_nz’s picture

What version of the module are you using? The latest version will resize any images that are too big for the browser window and will provide a link at the bottom to view the full size if you wish.

You can also edit line 10 of the file "image_nodes.js", from:

parent.href = nodes[i].src.replace(".thumbnail", "");

to

parent.href = nodes[i].src.replace(".thumbnail", ".preview");

This will show the resized preview version of the image, which is set using the image.module. This is not active be default because the image.module will not generate filename.preview.jpg if the uploaded file is the same size or smaller than the preview size you have set in that modules settings.

eferraiuolo’s picture

I'm using the current CVS version and ran into the same issue.

Couldn't it be possibile to add some code which would check the access control setting to view originals for the image module? Because I didn't want annonymous users to be able to save a copy of the orginal image, just the preview ones which I can control the size of.

I have my files download method set to private so a user couldn't just grab the original images via the URL, but now with lightbox v2 enabled the user can still get the image because this module shows it.

I am not sure how this would behave if access control resticted annonymous users from viewing the orginal images, but the image uploaded was smaller than the settings for the preview version. Because the image module behaves like you stated, no filename.preview.jpg or filename.orginal.jpg is created just filename.jpg and filename.thumbnail.jpg

Also the other idea i saw about having an extra link for the image info page, or clicking on the image would take you to the info page would be nice.

bugz_nz’s picture

Well, there is possibly a conflict with something else on your site then, as the script will resize images to fit the window automatically.

There are no permission settings in the module and it should obey any permissions set by drupal, if people can see something with the module then they could probably browse to it via the web anyway. I have no plans to implement any sort of strict permission system for this module - you should consider looking into the acidfree module or Gallery 2 and using those modules permissions.

I will have a look into creating a link to the main image page - consider posting it as a feature request against the module page and maybe a developer will pick it up before I can do it.

ryooki’s picture

I tried this using this fix with Lightbox 5.x.1.dev (something like that) for Drupal 5.x. It didn't work for me. :( Any more possibilities? Most of the images uploaded are screenshots, and very large. Lightbox is resizing the images, but they aren't small enough for me. I want to use the preview image that the image module creates, and not the resized image that Lightbox creates (which looks odd as well).

stella’s picture

Hi,

See issue #111649. This issue, where no preview is generated when uploaded image size is smaller than preview size, has already been reported and patched in the image module. I have a version of this module from 5th June and a preview image is generated even when the uploaded image is tiny and much smaller than the preview size. Try upgrading the image module in your drupal installation to see if this fixes the problem. You may need to regenerate images that you have already uploaded.

Cheers,
Stella