Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/60508-image-resizing-question-not-about-code/
Share on other sites

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/'.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.