Jump to content

Recommended Posts

I was asked a question recently which I couldn't give a definitive yes or no answer, so I have decided to throw it out there.

 

Lets say we have a website where the admin or users or both can upload images into various sections i.e a photo galleries. When an upload is performed, the code will rename the file, crop the image to the required sizes, add watermarks, copy to various folders, and save the file name to the database, etc. All is good, however a few years down the line, the website owner wants a revamp and the new design uses different size images to the current design. So, the question is, when an image upload is performed, is it a good idea to store and keep the original image in case of a re-design. In this case a script can be written to generate new images from the original as opposed to the admin having to re-upload new images.

 

The obvious issue is disk space as original images taken from digital cameras can be a few mb in size.

Link to comment
https://forums.phpfreaks.com/topic/272895-website-images/
Share on other sites

I was thinking maybe using the dropbox API to put the original image into an account and then remove it from the web server. If a script needed the original image it could use the API to fetch it from dropbox.

Edited by neil.johnson
Link to comment
https://forums.phpfreaks.com/topic/272895-website-images/#findComment-1404457
Share on other sites

For something like a photo gallery viewing the original image is one of the options people have.  I code my gallery to show a grid of thumbnails, clicking a thumbnail opens a medium version (eg, 800x600) and clicking that will open the original image.  For such a thing you'd have to store the original image anyway as part of the functionality of the script.

 

If for some reason it is something that doesn't need the original as part of it's use, I'd still store it anyway probably.  That way you can re-generate the thumbnail if need be. As mentioned, you could reduce the image some if it's gigantic, like maybe only store a max of 1280x1024 or similar.

 

Link to comment
https://forums.phpfreaks.com/topic/272895-website-images/#findComment-1404459
Share on other sites

I will have to look at keeping a copy of the original upload at a specific resolution as you guys have suggested for future projects. As I am not a designer I have never been given a design that required an original size image. I have always scaled and optimized images to the size required on the design and destroyed the original.

Link to comment
https://forums.phpfreaks.com/topic/272895-website-images/#findComment-1404467
Share on other sites

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.