Hi, I'm new to Drupal and requesting features, but there's a feature for Lightbox that I feel would be great: allowing the user to save the image. I'm transferring my site from a blogger site and would love to let my users save the images that pop up using Lightbox as many of them are video game screenshots, cover art, or fan art and I believe something people are generally interested in storing long term. I know the user could potentially middle click the thumbnail image (in Firefox) to open the full image in a new tab and then save it from there, but I propose two ways to integrate this feature into Lightbox.
(maybe there is some way to save the full image already, but it was not obvious to me)
1. When right clicking the full image in the Lightbox, there are no options to save the image. I'm not familiar enough with Lightbox to understand exactly what is going on, but I'm guessing this is related to the dynamic loading of the image. Adding this right click support seems unlikely.
2. My other suggestion is to add a button at the bottom of the Lightbox similar to the close (X) button that would popup the Save As... dialog and allow the user to save the image there. I believe that this is a much easier solution to implement, and might even be something that I could do.
Please let me know of what you think about this support request and whether it has been discussed before (I couldn't find anything), whether Lightbox already supports this somehow, or whether one of my solutions or some other alternative would allow this feature to be added to Lightbox.
Thanks.
Comments
Comment #1
Kripsy commentedI had a similar need and I solved it just by enabling the "View Image Details" in the view so that a user could just go to the node of the image and download the original file.
Comment #2
hansamurai commentedIt sounds like you might be using something like the Image module but my plan at the moment is to not create nodes out of images but instead load them directly to the file system. My reasoning behind this is that since each story will have 10-20 images, I'd rather not hit the DB so hard. If this doesn't make sense please enlighten me because I'm very new to Drupal and about three months away from launching my site. Plenty of time to make changes.
And what do you mean by enabling View Image Details? All I see related to that in the Lightbox options is to set the Text for Image Page Link to "View Image Details." And even with this field filled out I don't notice anything related about jumping to the image itself (note the images I'm testing this on are not nodes but just on the file system, I can test using something like the Image node later to see if that will reveal something different).
Comment #3
hansamurai commentedComment #4
hansamurai commentedI have two types of images on a story right now, one is simply stored on the server in the sites/default/files directory, the other is an Image node attached to the story. It seems that the "View Image Details" link only shows up on the Image nodes and not on the directory images. This would basically solve my feature request as I can call "View Image Details" something like "Click to download image". Is there reasoning behind this link not appearing for directory stored images?
I can provide pictures or whatever if you're interested in seeing the difference, but just imagine the Lightbox without the view image link. Thanks.
Edit: I believe I found the code in lightbox2.module that creates the View Image link:
Right now it appears the link creation is limited to simply nodes, I'm going to investigate to see if I can add support for general images...
Comment #5
hansamurai commentedWell, I figured it out, and I guess I should just read the documentation better.
http://drupal.org/node/144488
This seems to be exactly what I need, so I'm going to close this. If anything I learned Lightbox2 pretty well.
Comment #6
75300 commentedI'm sorry for opening this relatively old theme but please - could you suggest what should I do to make the right-click save for lightbox opened images available in FF? That doesn't seem to be limitation of FF itself. At http://www.stellapower.net/lightbox2 it works great. At my websites I cannot reach this: right-clicking opens menu that looks like one for a web page, not image. (And yes, I read documentation). FF 3.5.3, Drupal 6.11, Lightbox 6.x-1.9 (tried 6.x-1.x dev, no luck), images uploaded with FCKeditor+IMCE.
Comment #7
stella commentedThere is a "download original image" link for lightbox2 for imagefield and image module images. You just need to ensure users have the "download original image" lightbox2 permission, along with any other necessary permission provided by imagefield / image modules. I think that should solve your problem.
As for the right click in Firefox - yes it will popup a menu. I'm not going to change that, as one of the options in the menu is to save the image.
Cheers,
Stella
Comment #9
dziemecki commentedThis is a bit old but, if anyone is still looking for a way to do this, here's how I did it:
Crack open the /modules/lightbox2/js/lightbox.js file in your favorite text editor. Scroll down to around line 734 and look for a line like this:
Append, right under that, these two lines:
That should do it.
Comment #10
gnarlytom commentedabsolutely awesome, thanks, exactly what i was looking for, as my files are stored directly on the server