Enabling the GD image extension with CloudLinux in cPanel

GD lets PHP applications create and process images, such as resized uploads, thumbnails and CAPTCHA graphics. Enabling the extension is useful when an application reports it missing, but supported image formats also depend on how the server's GD library was built.

Check access and requirements

Confirm that the application needs GD rather than another image library such as Imagick. Record the current PHP version and reproduce the problem with a small non-sensitive image. Large image dimensions can use far more memory than the compressed file size suggests.

01 Change the setting

  1. In cPanel, search for Select PHP Version and open the CloudLinux tool. It is commonly listed under Software. Select the intended domain if your installation displays a domain selector.
  2. Check the active PHP version and which websites the selector change will affect. cPanel may also offer MultiPHP Manager and MultiPHP INI Editor. These tools manage a different PHP configuration path. Identify whether the domain uses CloudLinux Alt-PHP or a native EasyApache PHP handler before editing.
  3. Open Extensions and locate gd for the active PHP version.
  4. Enable gd and save if required. Leave unrelated extensions at their existing values so you can identify the effect of this change.
  5. Return to the application and retry a small JPEG or PNG upload and thumbnail operation. Then test any additional formats your site actually accepts.

Confirm the expected result

Check the application's image-processing diagnostics or system information. In WordPress, the relevant Site Health information can help identify available image handling. Confirm that both the original upload and its generated thumbnail appear correctly.

Why can an image operation fail while GD is enabled?

If GD is enabled but a format still fails, check whether that format is supported, whether the upload directory is writable, and whether the operation exceeds PHP or account memory. Repeatedly increasing the upload limit will not fix a missing image codec. Give support the format, pixel dimensions and exact error.

  • 0 Users Found This Useful
  • cpanel-whm, development
Was this answer helpful?

Related Articles

Changing the PHP upload_max_filesize limit with CloudLinux in cPanel

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The...

Changing the PHP post_max_size limit with CloudLinux in cPanel

post_max_size limits the size of the entire HTTP POST body received by PHP. It includes...

Managing PHP extensions with CloudLinux in cPanel

Extensions add capabilities such as database access, multibyte text handling, image processing...

Configuring allow_url_fopen with CloudLinux in cPanel

allow_url_fopen controls whether PHP file functions can use supported URL wrappers, such as...

Configuring PHP error display and logging with CloudLinux in cPanel

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem...