Skip to content
doubtly

2 answers

Answer: The GD library (GD extension) must be installed and enabled in PHP.

PHP's image functions such as imagecreate(), imagecreatetruecolor(), imagepng(), imagejpeg() and imagestring() are provided by the GD graphics library. Without it, these functions are undefined.

  • On most setups you enable it in php.ini by uncommenting extension=gd (older Windows versions: extension=php_gd2.dll) and restarting the server.
  • You can check if it is available with phpinfo() or function_exists('gd_info').

GD lets PHP create and edit images (PNG, JPEG, GIF), for example to generate thumbnails, charts or CAPTCHA images.

Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.