Monday 22 December 2014

[dcphp-dev] Information Organization for Image Uploads

Colleagues:

I'm looking for some design-level thinking / advice about image uploads.  The client is a publishing platform with a requirement for several different image sizes and crops to be made from original images.  Each image may be cropped several times to isolate different parts of an original, and the resulting cropped images need to be stored at 1024x768, 800x600, etc.  As a result, each original could produce as few as 10 and as many as 30 to 50 final images.

This is a Laravel RESTful app.  Image resizing and storage is pretty much done at the "one-off" level, but I'm feeling queasy about the sheer number of image files and the right directory/file structure for image storage.

My instincts are to store a database row that holds some meta information about the original image and the URLs of the original and the primary crop.  Beyond that, I'm wondering about best practices for a RESTful URL and directory structure.  Let's say I want to retrieve image #42 in a few different sizes.  Does it make sense to store a separate sub-directory for image #42, with paths to each image?

//path/to/images/42/original
//path/to/images/42/1024x768
//path/to/images/42/800x600
//path/to/images/42/100x75

If you have some ideas and a moment to talk, please send me a phone number and a good time to call.  An email to john.r.paseur@saic.com or a call to 703.346.0600 will be most welcome.

Thanks and warm holiday regards,

Ray

--
You received this message because you are subscribed to the Google
Group: "Washington, DC PHP Developers Group" - http://www.dcphp.net
To post, send email to washington-dcphp-group@googlegroups.com
To unsubscribe, send email to washington-dcphp-group+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/washington-dcphp-group?hl=en
---
You received this message because you are subscribed to the Google Groups "Washington, DC PHP Developers Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to washington-dcphp-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

0 comments:

Post a Comment