Intervention/image · error · DriverException

Failed to resolve decoder {decoder::class} with driver {driv

Error message

Failed to resolve decoder {decoder::class} with driver {driver::class}

What it means

Error "Failed to resolve decoder {decoder::class} with driver {driver::class}" thrown in Intervention/image.

Source

Thrown at src/InputHandler.php:159

     */
    private function decoder(string|DecoderInterface $decoder): DecoderInterface
    {
        if (is_string($decoder)) {
            if (!is_subclass_of($decoder, DecoderInterface::class)) {
                throw new InvalidArgumentException('Decoder must implement ' . DecoderInterface::class);
            }

            $decoder = new $decoder();
        }

        if ($this->driver === null) {
            return $decoder;
        }

        try {
            return $this->driver->specializeDecoder($decoder);
        } catch (NotSupportedException $e) {
            throw new DriverException(
                'Failed to resolve decoder ' . $decoder::class . ' with driver ' . $this->driver::class,
                previous: $e,
            );
        }
    }
}

View on GitHub (pinned to 5598b9e397)

Solutions

  1. Confirm the decoder class exists and is autoloadable
  2. Verify the decoder's constructor can be resolved (driver given via the specialized decoder or a compatible constructor)
  3. Use decoder class names shipped for your driver, e.g. Intervention\Image\Drivers\Gd\Decoders\* or Imagick equivalents

When it happens

Trigger: Thrown at src/InputHandler.php:159 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Intervention/image@5598b9e397 (2026-08-23). Data as JSON: /api/errors/e70cb884ec5d1764. Report an issue: GitHub.