How can the GD library be installed in PHP to enable image manipulation functions like ImageCreateFromJPEG()?

To enable image manipulation functions like ImageCreateFromJPEG() in PHP, you need to have the GD library installed on your server. You can install the GD library by recompiling PHP with the necessary GD support or by installing the GD library through a package manager like apt-get or yum, depending on your server's operating system.

// Check if GD library is installed
if (!function_exists('imagecreatefromjpeg')) {
    echo 'GD library is not installed. Please install GD library to enable image manipulation functions.';
    // You can provide instructions on how to install GD library based on the server's operating system
}