jasper182 Posted July 25, 2007 Share Posted July 25, 2007 Currently I have a form where people can upload images that are viewable from another page acting as a central image library. The images are all stored in a MySQL database. However, some of the images that are uploaded are very large, much larger then will ever be needed for my site. I was told by a friend to look into using the GD library to resize the images after they are uploaded but before they are stored to the database. Ideally it would be something like "The image is never more then 600 pixels wide and 800 pixels tall" or something like that. However, after doing some research, I'm still fairly confused. Does anyone have a good example of how this should be done or at least the main function(s) I will most likely be using? Thanks. Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 25, 2007 Share Posted July 25, 2007 http://fundisom.com/phparadise/php/image_handling/image_upload_and_resize Tip: don't store images in a database, store filenames of the images - it's so much simpler. Quote Link to comment Share on other sites More sharing options...
jasper182 Posted July 25, 2007 Author Share Posted July 25, 2007 Thanks for the link, it looks like it will help a lot. One question though. Why would I not want to store images in a database? It seems to be fairly simple and its worked so far with no problems. Is there a potential problem with this that I'm unaware of? Thanks again for the help. Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 25, 2007 Share Posted July 25, 2007 heres my simple answer the bigger the db the slower it gets right? that is why i never tried doing that 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.