Install or enable PHP's gd extension in cmd code example
Example 1: Install or enable PHP's gd extension
apt-get install php-gd
Example 2: centos :Install or enable PHP gd extension.
yum install gd gd-devel php-gd
and then restart apache:
service httpd restart