Hi, I have latest version of image and image_import module installed, everything working fine. I set up image_import module in way that users cannot see original pictures. But when I import some files and look into default directory for storing images (as set in image module) I see for every picture three files:
P9020005.JPG - original file, 1600x1200
P9020005.preview.JPG - resized file, 640x480 (according to settings in image module)
P9020005.thumbnail.JPG - resized file, 100x100 (according to settings in image module)
I set that original images from upload directory are deleted after successful import and it is done, but tell me why is image_import copying original files into image default directory, even if I set users aren't allowed to see original files. Also, when I look into gallery and browse imported images, there is no way to see original nonresized picture, so why it is still copying originals?
Could this be affected some way not to do so?
Thanks in advance.
lakyljuk
Comments
Comment #1
benshell commentedI'm not involved with this module, but I can tell you that it's definitely not a bug. It's very nice to have the original still on the server so that if you need to resize the images again you'll be starting with the highest quality version available. I find this happens a lot. I just made some design changes to my site that involved resizing the thumbnails. I didn't have to do anything. I just changed the default size, and the thumbnails were recreated from the original. Imagine how bad the compression would look after resizing several times without the original!
The "delete originals" checkbox you're referring to deletes the images in the image_import directory after they've been copied.
Comment #2
syscrusher commentedBenshell is correct -- the "delete" feature is for the temporary directory into which the images are uploaded. The originals need to be copied into the image default directory because image.module now has a "lazy resize" feature, which means that not all size variants are necessarily created when the image is first imported. My code calls the function to create these derivatives, but it's possible that the site admin may add new sizes later, and the original would need to be available in order to scale to those.
Scott
Comment #3
lakyljuk commentedHmm, nice. Yes for reasons you are talking about it is suitable to have original copied too. But I haven't unlimited hosting space and I have many many photo galeries at old pages. I am converting it into drupal, but if every picture would be copied as original, resized and thumbnail, I would soon end up with full server, having not even half of galleries converted. I don't need to copy originals, I have everything backed up at DVDs. Yes, it can save time when you decide to change resolution, no need to resize already resized, but I don't need this.
Is there any way I could turn off this option? Yes, I can manualy delete originals after gallery created, but ...
I don't ask you syscrusher to add special option to leave/delete originals, but at least please tell me, if I can affect it by myself.
Thanks a lot.
Comment #4
syscrusher commentedI could add an option to my code to look and see if image.module has enabled "allow viewing of original image", but I'm really leery of doing that. The problem is that image.module tacitly assumes that the image original will *exist*, but that viewing can be turned on and off. If I break that assumption, I can't predict what image.module will do if originals-viewing is turned off when you import using my module, but then the site administrator turns it on later.
If time permits, I'll check with Walkah (developer of image.module) to see what his feelings are about this situation.
Scott