New Dilemma

Dilemma is a bit of an exaggeration but here is my issue. I have set up the site to show the pictures as thumbnails with the dimensions of either 300×200 or 200×133, I haven’t uploaded any thumbnails yet and I noticed that the site was loading up slowly. I’m sure its a safe bet that the site loads the full resolution photo as the thumbnails and that is why it takes a few seconds to load. The speed is an issue but that’s not the main problem. I had initially planned on using the same MySQL function to add both the high res file and the thumbnail but now I’m realizing that that won’t work. I currently have one table in my database for photos but I’m thinking that a better way of setting this up is to have another separate table for the thumbnails and connect it via the photo’s id. Hopefully it shouldn’t take very long but this is one of the things I enjoy, rethinking and rewriting to make the functionality more logical. I could have probably just thrown everything into the photo database but then the organization would get messy and create potential problems down the road.

Obviously, the best way to add photos and thumbnails would be adding them together, then deleting them together, but I didn’t know how to do it and I still haven’t thought of a way to, but, I’ll figure it out. For now I’ll create an add thumbnail functionality into the site for the photos that need it then I’ll work on uploading and deleting multiple files at a time. Just because I don’t know how to do something doesn’t mean there isn’t a way. I’m looking forward to figuring it out.

Leave a Reply

Your email address will not be published. Required fields are marked *