If you are receiving a FATAL error about undefined function imagecreatefromjpeg() or imagecreatefrompng() or imagecreatefromjpeg() or imagecreatefromgif.
That means either your PHP installation is missing GD extension or its not enabled. If you have access to your server extensions kindly turn on GD PHP extension of talk to your web hosting to enable GD Extension for you.
PHP 8 undefined function imagecreatefromjpeg()
In PHP 8+ the name of extension have changed from php_gd2.dll to php_gd.dll without 2. So if you have created any user.ini or php.ini files please edit them and check if you are running PHP 8 it should be php_gd.dll not php_gd2.dll
Create a file with PHP function phpinfo(); and check PHP information to make sure the GD library is enabled.
Make sure your php.ini have this line enabled for PHP 8
For PHP lower than 8
If its enabled in your PHP then most of the chances are you have something wrong with either your .htaccess, php.ini or user.ini files.
Turn on GD library in XAMPP
If you have installed XAMPP with PHP 8 support then there are chances GD extension is not enabled by default. Please edit php.ini file and add the following line somewhere and restart your XAMPP and apache server.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?