Cache folder, full sized images and rotation.

First is a security request. I like how the albums folder is relocated somewhere else. It's not accessible via the web because it's outside of the web folder. The cache folder isn't. If the person can figure out the exact string it's quite easy to access it. So make it like the albums and allow a relocation. Besides the cache folder gets huge after a while and I end up making a sym link anyways to offload it from the main web folder.

Second is a feature request and I saw someone below with the same request but I thought I'd add it in as well. I'd like to choose the size of the thumbnail, preview and the large size (not full-size).

Third is a feature request for auto rotation of images. The images should auto rotate based on the exif info.

Fourth is a feature request for an opt-in albums. What I mean is when the photos are automatically uploaded it's not made an album on the web until you turn it on.

Now before you go on let me explain beforehand why. I love your program. It's lightweight and fits what I need it for. Here's how I use it. My albums folders are just a link to my photos directory. It houses all my photos I ever have. When I download the photos from my camera it appears on my website. Easy and with no fuss.

What I do is I have a custom script that I run, and it automatically resizes the photos, auto rotates them and puts them into a separate website folder as a copy. Zenphoto looks at this folder for any updates. My script does the following, it resizes so that the large size is set, auto rotates and then publishes when I say it is ok. I want to eliminate this step and let zenphoto do that instead. With the feature request it will make it a heck more functional.

What do you think?

Comments

  • acrylian Administrator, Developer
    1. I don't see the point (others may correct me). Do you have the fear of someone stealing your images? If someone really wants to do that he will find a way anyway. I could do that via the browser while visiting your site anyway, too, without any problems.
    For the cache cleaning there is a button in the admin and with edit each for each album.

    2. You already can set the sizes for thumbnails and the sized images in the admin or via template functions. What "large image" do you mean, we have thumbnails, sized images (that on image.php) and the full size image which is that one you upload.

    3. There is already a feature request for that. Head over to the poll on our site and vote for that feature.

    4. It should be possible to set albums to not show by default. Please post a trac ticket for that request
  • 1. If the album folder is located outside of the web folders there is no direct access to it other than through the php script and that is passworded. The cache folder is wide open and you can figure out the cache name based on the name of the file. This is an issue if the album or photo is protected (password) yet the cache is accessible.
    With the cache location all I'm saying is it would be nice that it can be configured like the albums in the zp-config. It's not really a big deal for me because I just create a sym link to another location with more storage.

    2. What I'm trying to do is to protect orignal image yet make it almost transparent. First it makes for a smaller download (people will not want to download my 12mpix file and would rather have a smaller file that is enough to make a 4x6 print out of). Currently there's three image versions that exist, the thumbnail, the preview (regular) and the orignal image. Yes I can 'prepare' the original images so that they are the final size (say 1800x1200) but it's one more step I have to run. I'd like to be able to take the images from my camera into my regular photo dir, have zenphoto scan for the new folders automatically. Right now I run a script to put the photos (resizes them) into another folder which zenphoto scans for instead of my main folder.

    3. Cool thanks!

    4. OK will do.

    Again great job on zenphoto. It does almost what I need and it's really simple for me to deploy to my friends without them getting frustrated.
  • acrylian Administrator, Developer
    Ok, I understand what you mean. So again, please open a trac ticket for that, too. In general we add the feature requests to our poll to see what is most wanted.

    Regarding 2.: So this ticket would be something similar?: http://www.zenphoto.org/trac/ticket/37
  • I don't think you really want to have the cache folder outside of the zenphoto folders. Doing this would require zenphoto to process EVERY request for an image. This would add a lot of overhead to your server.

    For #2, you can take the full-image.php file and modify it to resize your image to whatever size you would like "full images" to be. Again, this will cause overhead everytime a "full image" is accessed, but that happens now if watermarking is set.

    Anyway, I have always believed you should do any image processing at the earliest point in the process possible. Otherwise you are adding overhead on repeated operations. It really is best if you resize your images to the size you want before they are uploaded so that they don't have to be resized every time someone accesses them. Just makes sense from a conservation of computing resources point of view.

    Your call, though. It is your site performance that is impacted.
  • Yes we wouldn't want anything that impacts the speed of the site! Another possiblity is to add a short hash to the filename that is combined to a random number generated in the begining of the install and saved into the zp_options (db or file). So a cache filename of IMG_2333.JPG_595.jpg becomes IMG_2333.JPG_595_3ae32sfa.jpg so it will be extremely difficult to brute force without the key.

    As for the processing locally or on the server, it has to be done on one of them so it really isn't much of an overhead unless it's constantly being polled.

    I am assuming once the cache is created it stays available until you force a manual cleanup so essentially it isn't generated anymore.

    As for the full image we don't have a cache of that so that will mean the file is generated on the fly. But most people are not interested in the full size unless they really want it. I was thinking about modifying the default theme so clicking on the normal photo doesn't automatically open up the full original size. Instead it will be a link below the image so people will have to make a conscious effort to want to open the larger pic.
  • Well, whatever you use for the cache file name will be part of the HTML, so if someone wants to find the file all he has to do is view the web page source.

    Unless you are putting images in the cache file, they would be resized every time they were viewed--that is much more overhead than resizing once before you upload.
  • trisweb Administrator
    sbillard - is this true? I thought password-protected photos can't be seen without the password even for the thumbnail. Wouldn't that mean the actual image cache filename would be hidden unless the viewer has entered the password? If not, I'm sure we could find some way to implement that.
  • It is true and not true. As of the nightly, the thumbnail of a password protected album is replaced with a stand-in image. Version 1.1.4 does not do this. So, I guess that on 1.1.5, the album file name is hidden.

    In all cases you don't get any image thumbnails shown because you can't get the album open without the password.

    EDIT: But, I did not take this thread to be a question of password protection. What I thought williamz was talking about was not letting someone get the full sized image while allowing him to view the album/image pages. See his second post, item #2.
  • trisweb Administrator
    Thanks, I had misunderstood. I think password protection already covers all protections, he is indeed talking about just protecting all full-sized images.

    Shouldn't moving the /albums folder to an inaccessible location, and disabling the full-image script do the trick (perhaps with an option)?

    @williamz - One more possibility: Would you like a limit to the maximum size image a user can request? That would be an easy option to allow.
Sign In or Register to comment.