What could be causing the "Fatal error: Call to undefined function ImageCreateFromJPEG()" in the PHP script?
The error "Fatal error: Call to undefined function ImageCreateFromJPEG()" occurs when the GD library is not enabled in PHP. To solve this issue, you need to enable the GD library in your PHP configuration.
// Check if the GD library is enabled
if (!function_exists('ImageCreateFromJPEG')) {
die('GD library is not enabled');
}