2 answers
Best answer
GD library is needed to execute image functions.
Was this answer helpful?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
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.iniby uncommentingextension=gd(older Windows versions:extension=php_gd2.dll) and restarting the server. - You can check if it is available with
phpinfo()orfunction_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?
Thanks for the feedback.
Sign up free to save answers and ask your own doubts
Your answer
Log in or create a free account to answer this question.