helloworld001 Posted August 27, 2015 Share Posted August 27, 2015 Say I am uploading an image that gets resized. The resized image is a thumb. I have it's file path saved in the database and the image itself saved in a folder. Originally I was saving both to the database and folder. But now that I think about it, do I have to save the orginal image? Wouldn't I be saving up a lot of space if I only save the thumb image? What do you think? Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/ Share on other sites More sharing options...
ginerjm Posted August 27, 2015 Share Posted August 27, 2015 Generally when viewing thumbnail images in a gallery (?) one finds it nice to be able to click on one and see the full-size image in a window. Having these images and choosing to upload them and make them thumbnails - what is the point? If you don't need the full size image, why didn't you just resize it where you originally had it and never upload the fullsize one? Basically it comes down to - do you need it? Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519765 Share on other sites More sharing options...
maxxd Posted August 27, 2015 Share Posted August 27, 2015 Why not resize the full-size image to thumbnail when serving the thumbnail images? You upload and save the path to the full-size image, then pass that image through some GD functions on the gallery page. That way you're only storing the big image and can have thumbnails of different sizes if necessary. It's been a while since I've done it this way, but it worked well for me. Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519766 Share on other sites More sharing options...
ginerjm Posted August 27, 2015 Share Posted August 27, 2015 I can't imagine that the thumbnails take up that much space. If the OP is saving the fullsize ones already (for possible use later on), the addt'l space is a fair tradeoff for the processing time the thumbnail conversion adds to the page load each time it is called upon Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519768 Share on other sites More sharing options...
Barand Posted August 27, 2015 Share Posted August 27, 2015 Why not resize the full-size image to thumbnail when serving the thumbnail images? Uploading is done once, viewing is done many times. It's a better use of resources to resize the once rather than the many, especially if you have a gallery page serving up, say, 20 images per page when it could have a significant impact on the page load time. Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519770 Share on other sites More sharing options...
helloworld001 Posted August 27, 2015 Author Share Posted August 27, 2015 Generally when viewing thumbnail images in a gallery (?) one finds it nice to be able to click on one and see the full-size image in a window. Having these images and choosing to upload them and make them thumbnails - what is the point? If you don't need the full size image, why didn't you just resize it where you originally had it and never upload the fullsize one? Basically it comes down to - do you need it? I should mention that the resized image(thumbnail) is still fairly large enough in terms of resolution, but lower in file size. And that's all I'll be using throhghout the site. Since I have no use for the original image, I guess it's best to not save it. It will definitly save up space in the directory. Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519771 Share on other sites More sharing options...
maxxd Posted August 27, 2015 Share Posted August 27, 2015 @ginerjm & @Barand: true... @helloworld001 - so you're not creating thumbnails, you're optimizing the images? Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519786 Share on other sites More sharing options...
helloworld001 Posted August 27, 2015 Author Share Posted August 27, 2015 @ginerjm & @Barand: true... @helloworld001 - so you're not creating thumbnails, you're optimizing the images? In my case, thumbnails mean a resized image. I basically upload and resize the image(with new resolution and smaller bytes). I know now that I don't have to keep the original image in the database and directory folder. The resized image(thumbnail) is all I need. Quote Link to comment https://forums.phpfreaks.com/topic/297960-do-you-think-its-a-good-idea-to-save-the-original-image-when-creating-a-resized-image/#findComment-1519794 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.