1. Home
  2. Computing & Technology
  3. PHP / MySQL

Creating Thumbnails with PHP using the GD Library

By Angela Bradley, About.com

1 of 4

Before You Begin

When viewing files online, it is often necessary (or at least convenient) to be able to create a thumbnail image on the fly. You may want to create previews of photos you are linking to, or perhaps resize photos for your website to a more user friendly size without having to bother with a graphics program.

In this tutorial we will explore how to do this using imagecopyresized () and using imagecopyresampled. We will also cover calling the image from the PHP file, as well as saving the image to your server.

Before you begin, you should have a general knowledge of PHP and know a little about the GD Library. Also be sure you are actually running the GD Library on your version of PHP.

Index: Creating Thumbnails with PHP using the GD Library

  1. Before You Begin
  2. Using Imagecopyresized ()
  3. Using Imagecopyresampled ()
  4. Using The Thumbnail Images

1 of 4

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. Graphics- GD Library
  5. Create Thumbnail PHP - Thumbnail GD Library - GD Library PHP Thumbnail

©2008 About.com, a part of The New York Times Company.

All rights reserved.