# Do you support the GD graphics library for PHP?

> Yes. The GD graphics library is available for PHP on Ruachost hosting, so scripts can resize images and create thumbnails and charts.

Source: https://helpcenter.ruachost.com/faq/guides/do-you-support-the-gd-graphics-library-for-php/

**Yes.** The **GD** graphics library is available for PHP on Ruachost hosting.

GD lets your PHP scripts create and edit images. It's commonly used to:

- Resize uploaded photos and create thumbnails.
- Add watermarks or text to images.
- Draw charts and CAPTCHA images.
- Convert between formats such as JPEG, PNG, GIF and WebP.

WordPress, WooCommerce and many other applications use GD (or ImageMagick) to create image sizes when you upload media.

```php
<?php
$img = imagecreatefromjpeg('photo.jpg');
$thumb = imagescale($img, 300);
imagejpeg($thumb, 'photo-thumb.jpg', 85);
```

## Check that GD is switched on

If you see "Call to undefined function imagecreatefromjpeg()":

1. Log in to cPanel.
2. Open **Select PHP Version**.
3. Click **Extensions** and make sure **gd** is ticked.

See [Changing PHP versions and settings using PHP Selector](https://helpcenter.ruachost.com/cpanel/software/changing-php-versions-and-settings-using-php-selector/).

For more advanced image work, see [Using ImageMagick](https://helpcenter.ruachost.com/developers/linux/using-imagemagick/).
