Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Create Thumbnail image in PHP

  • 03-03-2008 06:58PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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
Advertisement