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

Creating Thumbnails with PHP using the GD Library

By , About.com Guide

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.

Explore PHP / MySQL
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

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

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

All rights reserved.