gerkintrigg Posted July 18, 2007 Share Posted July 18, 2007 Hi everyone... Here's a novel post... it's NOT about code! (blimey) I'm building a stock photo library website and I've worked out how to upload images, rename them, resize them and plonk a watermark on them. Now my question is: What's the best way of organising the information (the pictures)... I could either have a big watermarked image that I then resize and bung on screen each time the image is requested (before paying)... that'd save web space but increase demand on the server's CPU or resize it all at upload and reference each image which would increase disk space usage and the size of the database... I'm tending more towards the latter approach, but that'd mean having 8 images... 4 different sizes for the non-watermarked image and 4 for the watermarked image. What then happens when I increase the number of options available? I'd need to go back over the entire catalogue and re-sample for the new specification. Any recommendations are very welcome. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted July 18, 2007 Share Posted July 18, 2007 I use the latter approach but without the extra database records. Caching is good so saving the thumbnails as an image in their own right is a plus in my book. I simply have a folder called 'thumbnail' in each directory for those images with tumbs. When it comes to listing images etc I simply query the database for images that should be on the page and simply replace the last '/' with '/thumbnail/'. Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 18, 2007 Share Posted July 18, 2007 The PHP Help forum is for help with code - Moving! Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted July 18, 2007 Author Share Posted July 18, 2007 My appologies. Quote Link to comment Share on other sites More sharing options...
akitchin Posted July 18, 2007 Share Posted July 18, 2007 you could also look into using a third-party setup like phpthumb. it creates a thumbnail on the fly and has a caching feature, complete with expiration date. it comes with a bunch of different options like watermarking, thumbnailing with a zoom-crop, etc. i don't work on the project, but i've found it a great combination of features and load-bearing. saves db space (only need the one filename) and reconciles HDD space with CPU usage. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.