GD missing PHP Origin: Application & API Last updated 12 Oct 2026

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

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

Exact message you may see Call to undefined function imagecreatefromjpegCall to undefined function imagecreatetruecolor
Seen on: PHP

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

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1011 — Cloudflare Error 1011: Access denied (Hotlinking denied) (Cloudflare)101142883 function — ERROR: function x(text) does not exist — No function matches the given name and argument types (PostgreSQL)42883 functionCall to undefined function — PHP Fatal error: Uncaught Error: Call to undefined function (PHP)Call to undefined fun…conflict: unable to remove repository reference — conflict: unable to remove repository reference (must force) - container is using its referenced image (Docker)conflict: unable to r…could not find driver — PDOException: could not find driver (PHP)could not find driverexec format error — exec /usr/local/bin/docker-entrypoint.sh: exec format error (Docker)exec format errorextension not available — ERROR: could not open extension control file ".../postgis.control": No such file or directory (PostgreSQL)extension not availab…image has dependent child images — conflict: unable to delete image (cannot be forced) - image has dependent child images (Docker)image has dependent c…GD missing

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.