"Best" method(s) for upload and server-side photo resize?

pgeorge137

Joined: 2007-07-16
Posts: 35
Posted: Thu, 2008-10-30 00:56

This is, admittedly, just another variant of other questions I've posted here.

I've used the gallery product before, but in the past month I have started experimenting with setting up a gallery for a Boy Scout troop where users can upload their own photos. Naturally, I've had more problems in the past five weeks than in all of time before that when it was just me uploading!

My first question here is what is the "best" option for uploading photos?

My gallery, when I'm trying to add photos, gives me these options:

** From Web Browser
** From Web Page
** From Local Server
** Link
** Upload Applet
** WebCam/Live Image
** From Picasa 2
** Windows XP
** Gallery Remote

I've always used the Upload Applet. Works great, and the drag and drop is fast and easy.

However, I always have my photos downsized on my PC before uploading; people trying to upload unresized 8 megapixel shots or bigger are killing it. Tonight, someone uploaded new photos into an existing album and made it so the existing album would just display as a blank page, until I deleted the new photos via ftp.

So the second question is how do I have forced image resizing (based on file size and dimensions) be done on the server side? I think on my computer, the occasional overlarge photo gets resized PRIOR to upload. But I don't want to (rather, I can't) force users to configure things on their end for this to happen.

On a gallery 1 site that someone else administers, but I have upload rights to, overlarge images are nicely iteratively resized (on the server side, I am sure) until they comply with the administrator's size restrictions. I'd imagine that functionality carried into gallery 2, but I can't find it.

So again,

1. What's the best way to add photos to a gallery, with ease (drag/drop ideally, or batch upload) being one factor and with prevention of gallery hosing being another factor?

2. What's the easiest and most effective way to implement server-size photo resizing?


Gallery version = 2.2.6 core 1.2.0.8
PHP version = 5.2.3 cgi-fcgi
Webserver = Apache/1.3.37 (Unix) mod_throttle/3.1.2 FrontPage/5.0.2.2635 mod_psoft_traffic/0.2 mod_ssl/2.8.28 OpenSSL/0.9.8b
Database = mysql 5.0.41-community-log, lock.system=flock
Toolkits = Dcraw, Exif, Ffmpeg, Getid3, LinkItemToolkit, Thumbnail, Gd, ArchiveUpload, NetPBM, ImageMagick
Acceleration = none, none
Operating system = Linux web317.opentransfer.com 2.6.26.5-SMP2 #3 SMP Sun Sep 14 00:24:49 CDT 2008 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3
Rows in GalleryAccessMap table = 61
Rows in GalleryAccessSubscriberMap table = 138
Rows in GalleryUser table = 8
Rows in GalleryItem table = 136
Rows in GalleryAlbumItem table = 12
Rows in GalleryCacheMap table = 0

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2008-10-30 03:22

Use the Size Limit module: http://codex.gallery2.org/Gallery2:Modules:sizelimit

This is totally up to you, but for user friendly-ness I would remove most of those upload options. Yes, yes, yes choice is good. Until it comes to having to support it. Decide what you are willing to help with and go with that.

Personally for user friendly-ness and what most people are use to and depending how many photos people are uploading, if I were you I'd probably only have these options:

From Web Browser

From Local Server (for myself) and I'd probably go through the trouble to edit the code to hide that tab for everyone but me as I wouldn't give anyone else FTP access to upload files to upload from the local server...

Upload Applet / Gallery Remote

If people used or want other options that would be another story
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
pgeorge137

Joined: 2007-07-16
Posts: 35
Posted: Thu, 2008-10-30 13:44
nivekiam wrote:
Use the Size Limit module: http://codex.gallery2.org/Gallery2:Modules:sizelimit

I do have the size limit module installed and configured to 400k max file size, 800 pixel maximum dimension.

I think the problem I'm having relates to what's explained in
http://codex.gallery2.org/Gallery2:FAQ#Why_can.27t_I_upload_big_files_.28over_a_megabyte_or_two.29.3F - and when I add the lines it suggests to my .htaccess file I get the "Internal Server Error" (error status 500) error.

I guess I could just put it in black and white that users should not upload images larger than (whatever), but that's not as robust as allowing them to upload whatever they want, then having gallery fix it.

nivekiam wrote:
Personally for user friendly-ness and what most people are use to and depending how many photos people are uploading, if I were you I'd probably only have these options:

From Web Browser

From Local Server (for myself) and I'd probably go through the trouble to edit the code to hide that tab for everyone but me as I wouldn't give anyone else FTP access to upload files to upload from the local server...

Upload Applet / Gallery Remote

Does Gallery 2 allow a .zip file of images to be uploaded, then automatically expanded? This might be an option too - single file upload is pretty easy. If so, how do I configure this, and will it enforce my size requirements, including not saving large originals?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2008-10-30 14:07
Quote:
and when I add the lines it suggests to my .htaccess file I get the "Internal Server Error" (error status 500) error.

Then I would ask my host. If they aren't of help, well personally I'd change hosts, but then I'd hack the page to put in the text you suggest.

Quote:
Does Gallery 2 allow a .zip file of images to be uploaded, then automatically expanded? This might be an option too - single file upload is pretty easy. If so, how do I configure this, and will it enforce my size requirements, including not saving large originals?

Just install the Archive Upload plugin. Make sure to test it Site Admin > Archive Upload you may have to enter a path to unzip

But you'll still have issues with file sizes. JPG files are already compressed and zipping them won't make them any smaller, uploading a zip file is purely convenience to upload 1 file instead of 20.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here