I know there have been a few threads on dynamic images, but none that I found really pertained to my problem.
So, I need to figure out how I’m going to resize user uploaded images on a site I’m working on, both for the sake of viewing normally (converting a large image to a “normal-size” that I specify) and for thumbnails. The level of computer know-how of the target audience is expected to be idiot to guru, so this needs to be sort of easy for the end user (a la Facebook). In addition, I’m trying to decide if I should host these images myself, because for many members of the target audience, asking to host their images somewhere will be asking a lot.
I have about 18GB to play with on my server, and for a conservative estimate, if each image took up 100k (20kb for the thumb, 80k for the normal, I know, overestimate, but I want to be sure), and I had 10,000 images, that would be 1GB. That should be enough I think. If this thing explodes and gets crazy, I’ll be buying more hosting anyway.
I see my options as:
-
Taking the image they provide, putting the file path into the DB, and using image functions every time the image is viewed either in normal or thumbnail mode.
-
Taking the image they provide, using image functions to store a thumbnail and normal-size on my server, and putting the paths to those images into the DB, only using the GD library when the file is initially uploaded.
-
Using JavaScript to resize the images on their local machine, then uploading them to
my server, and inserting both the thumbnail and normal-size file paths into the DB.
The third option is wishful thinking, as I do not yet know JavaScript and probably won’t have time to learn it until after this project, and I don’t want to pay for one that does this (I saw one that looked pretty good).
Am I missing something here or going about it all wrong? And is the GD library fast enough to handle a high volume of users, or would paths to already resized images be better/faster?
Thanks.