Link to home
Start Free TrialLog in
Avatar of shdwmage
shdwmageFlag for United States of America

asked on

PHP - AJAX Photo Uploader

Good Afternoon,

I have spent some time browsing the search results looking for an answer to my question and I haven't quite found what I am looking for.

I am looking for an open-source photo-uploader with resize capability.

Here is some background information:
The website I am currently constructing allows people to register for a contest.
The website currently tracks personal information, measurements, and subsequent
updates.
Each registrant is given a random ID code that I would like the photo tied to.

I would like the photo re-size to happen locally before upload, but allow for it to be done server side if for whatever reason the browser does not support local re-sizing.


I have decent experience with PHP and classes, but I have never had a reason to upload photos and re-size them before.  So I would greatly appreciate some direction or examples I can use to create my own code or use someone else.

Thanks!
Avatar of sognoct
sognoct
Flag of Italy image

my favorite script for resizing pics is :

TimThumb – PHP Image Resizer

for the uploading php has native good libraries. w3 school provide useful tips for building a correct and secure php upload form :

w3school php upload file

just have to mix the two things and adjust according to your needs.
The upload-image part of this is one thing; the resize-image is a separate thing.  jQuery may have some image-crop tools, but the resize is probably best done on the server after the image is in your control.  Can you please show us what you've tried so far and where you've had troubles?
agree with @ray

please refere the link it contains cropping of your images .

http://trentrichardson.com/2009/10/25/uberuploadcropper-jquery-upload-and-crop-plugin/
Avatar of shdwmage

ASKER

Ray,

I have been looking at a couple of different pre-packed code sets.
The one that I really thought I could get working on the server side is not working. It kicks out multiple errors and I don't know enough about the PHP resize functionality to see what it is.

Ajax Multiple Image Upload-Resize with jQuery and PHP

I have a jQuery one that I've been looking at as well, but sadly my knowledge of jQuery is really low. Plus I am under a time crunch so picking up a new language isn't feasible at this point in time. So I scrapped even looking at that one.

More background information
This is not the first version of this website. The previous version required users to email in their photos, but with more than 700 registrants it made a lot of tedious work tying the two pieces of information together.

However, this did give me the ability to check and see exactly how the users would be sending their photos. The photos do not need to be cropped at all, they just need to be shrunk down to a usable size. There were people sending photos taken at 12 megapixels which really isn't required. The photos really only need to be a monitor appropriate size.

I would like to store the photos in a folder based on the participant ID number. I can create this folder and even store files in it. The issue I am running into is the re-sizing. Due to the extremely large file size of some of the submissions I wanted to find one that could resize locally if necessary and then upload a smaller file.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not 100% what I was looking for but I was able to make it work.

Thanks Ray
You're welcome.  Thanks for the points and thanks for using EE, ~Ray