Enabling the GD image extension with CloudLinux in DirectAdmin

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 DirectAdmin, open the appropriate user account and domain, then search for Select PHP Version. In Evolution it may appear under Extra Features. Open the CloudLinux selector, not an unrelated server administration page.
  2. Check the active PHP version and which websites the selector change will affect. DirectAdmin can expose both its native PHP selection and CloudLinux PHP Selector. The selected domain in DirectAdmin does not by itself prove that an Alt-PHP change is isolated to that domain. Check the selector scope before applying an account-wide change.
  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
  • control-panels, development
Was this answer helpful?

Related Articles

Changing the PHP version with CloudLinux in DirectAdmin

A PHP version change can make an application compatible with current dependencies and security...

Managing PHP extensions with CloudLinux in DirectAdmin

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

Configuring allow_url_fopen with CloudLinux in DirectAdmin

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

Configuring PHP error display and logging with CloudLinux in DirectAdmin

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

Adjusting the PHP memory limit with CloudLinux in DirectAdmin

memory_limit limits memory available to an individual PHP script. Increasing it can help a...