# Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg()

**Code:** `GD missing` · **Category:** PHP · **Seen on:** PHP

The GD extension (or its JPEG/WebP support) isn’t installed for the PHP version serving the site.

## Meaning

Image resizing, captchas and thumbnails need GD (or Imagick). PHP may be compiled without JPEG/WebP support even if GD exists.

## Common causes

- php-gd not installed
- GD built without JPEG/WebP
- Different PHP version for web vs CLI

## Quick fix

1. Install: `sudo apt install php8.2-gd` and restart FPM
2. Docker: `docker-php-ext-configure gd --with-jpeg --with-webp && docker-php-ext-install gd`
3. Check `gd_info()`

## Detailed fix by platform

### Docker

1. Install libjpeg/libwebp dev packages before configuring GD

## How to diagnose

1. **Loaded** — function_exists('imagecreatetruecolor')
2. **Formats** — gd_info() JPEG/WebP support

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/php/gd-image-function-undefined)
