Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Create Thumbnail image in PHP

Options
  • 03-03-2008 6:58pm
    #1
    Registered Users Posts: 45


    Hi,
    I have created a web page that allows the user to log in and upload photos. The uploaded photos are saved to a folder. I now need to create thumbnails of all these images in the folder for a gallery I am creating. Is there anyway I can batch process all the images to create thumbnails in a new thumbnail folder within the original folder?
    Any help would be appreciated or even links to any good tutorials that will help me with this.

    Thanks


Comments

  • Closed Accounts Posts: 81 ✭✭dzy


    Try using the gd library for PHP. Here is a tutorial : http://icant.co.uk/articles/phpthumbnails/


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Once you have all the current ones done why don't you set it when the user uploads their image, it is at that instance that you create the thumbnail. Its quite simple in PHP - I do mine on the fly in my shopping cart - bit more intensive on the server and probably would not suit your setup.


  • Registered Users Posts: 45 Jordan79


    thanks for your help.
    I have managed to edit the upload code so that it creates a seperate thumbnail of the image on upload in a thumb folder.


  • Registered Users Posts: 1,045 ✭✭✭Bluefrog


    There's an excellent library for doing thumbnailing in PHP called PHPThumb - allows you to simply do watermarking, caching of thrumbnails etc. It will figure out what image manipulation libraries you have available and automatically choose the most capable one for you. You can see it in action on www.rossfineart.ie.


Advertisement