What is the GD library?
GD Library is nothing but an web programmer’s dynamic graphics generation tool.GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development.
Why PHP GD Library is Important for WordPress?
WordPress will not be able to resize images to create thumbnails if PHP GD is not installed on your web server. Its very easy to confirm if GD library is installed or not. Recently we moved Geekyard from shared to VPS web hosting. While submitting post to digg, it doesn’t recognize the post image. Then in recent post also image was also not displayed. While cross checking “Special Recent Post” plugin settings we found the root cause i.e GD Library is not installed on web server. The following was the error message,
“Error! GD libraries are not supported by your server. Please contact your hosting/housing company support, and check how to enable it. Without these libraries, thumbnails can’t be properly resized and displayed.”
How to verify GD library is installed or Not?
1. Create a php text file and put the following code in it and save it as gd.php,
1 2 3 4 5 6 7 8 | <?php if (extension_loaded('gd') && function_exists('gd_info')) { echo "Yes, GD library is INSTALLED on your server"; } else { echo "GD library is NOT installed on your server"; } ?> |
2. Upload it to the main directory of your website using FTP client, like this:
http://www.yoursite.com/gd.php
3. If its installed it will show a message “Yes, GD library is INSTALLED on your server”, if not, then it will display, “GD library is NOT installed on your server”.
That’s it 🙂 After that you can contact your Web hosting company to install GD library.