I would go with option B.
If the system get to bogged down you can always fall back on option A.
and/or if possible try and spread the load of the script on to more than one server.
just my take on it![]()
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!I'm in the process of developing a website, one of the function i have made allows for users to upload multiple images.
When the image is viewed later on by users only a smaller thumbnail version with a watermark is shown.
I have completed this script, and it works perfectly however i have the following two options to consider.
My script can already do both of the following, i just don't know which option to use.
A. Should i resize, watermark and save the new smaller watermarked version of the file to my server upon upload.
B. Should i resize, watermark the file on the fly each time a user goes to view it without saving it to my File System.
Option A, will take up alot of Server space, though will it make for a faster load time of the image?
Option B. will take up NO extra space as the files are not saved, though will resizing, watermarking images on the fly slow down my website.
Any ideas which option i should implement?
I would go with option B.
If the system get to bogged down you can always fall back on option A.
and/or if possible try and spread the load of the script on to more than one server.
just my take on it![]()
I will go for A. I dont care about few hundred kb files. Most webhosting comes with what? 360GB for only ~$6.45 a month? I can already store 20000+ image files. And thats only with shared web Hosting.
Load time is whats important. Lets say you go into a restaurant, you are a visitor yourself, do you return to a restuarant that serves you food in 5 minutes, or the other one in 50 minutes?
Try think on the view of your visitor. They are what profits your site. What you as well need is a script that deletes images files that have not been viewed for a certain time period, lets say, 3 months. The decision is however, up to you of course![]()
As the Original images would reside permanently on ur server, i suggest when u upload at that time only have another thumbnail image stored along with it. I'm sure u must have a database to log the physical file name of the image, have another field for the thumbnail too.
As you would need it to be shown everytime, it only makes sense to retrieve it the next time on.
<<< Krossat's Blog: Attachment to Some Domains >>>
<<< CloudNavigate.com | Image-Gallery.com | DesignClouds.com | AAYU.com | DietChips.com >>>
Thanks, for all the advice...
I've decided to go with Option A, and create a thumbnail upon the initial upload. My server has 200GB of remaining space, so i'm sure it will all fit. and as you guys said i need to look on it from the users perspective and not costing for extra storage.
The reason for my choice, is the load time for the user, and also an error that came up if i loaded more than 30 images or more than 25mb on the one page at the same time.
As each image is shown they do flicker for a split millisecond as they are redrawn, and the error was an ASP.net Our of Memory.
As for word press, im not sure i have never used it before. This script i custom made as follows.
The interface is made in Flash 8, which allows for multiple uploads of a certain filetype, the flash file sends the location to a 'Classic ASP' server side script which uploads them and saves them to a database. once saved it then renames them with a unique string.
Then the classic ASP page calls an ASP.net script which creates a smaller thumbnail and inserts a watermark on each image.
Bookmarks