phalcon/cphalcon · error · Phalcon\Image\Exceptions\ExtensionNotLoaded

Imagick is not installed, or the extension is not loaded

Error message

Imagick is not installed, or the extension is not loaded

What it means

Thrown by Imagick adapter::check when the 'imagick' class does not exist, meaning the ImageMagick PHP extension is not installed or not loaded. Install/enable ext-imagick before using the Imagick adapter.

Solutions

  1. Install/enable the imagick extension (pecl install imagick) and restart PHP
  2. Use the Gd adapter as an alternative when imagick cannot be installed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at phalcon/Image/Adapter/Imagick.zep:948 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/0a07f184ccaca1ab. Report an issue: GitHub.

Appendix: source

Thrown at phalcon/Image/Adapter/Imagick.zep:948

            if (true !== current->nextImage()) {
                break;
            }
        }

        image->clear();
        image->destroy();
    }

    /**
     * Checks if Imagick is enabled
     *
     * @return void
     * @throws Exception
     */
    private function check() -> void
    {
        if (true !== class_exists("imagick")) {
            throw new ExtensionNotLoaded("Imagick");
        }

        if (defined("Imagick::IMAGICK_EXTNUM")) {
            let this->version = constant("Imagick::IMAGICK_EXTNUM");
        }
    }

    /**
     * Marks every frame with the format.
     *
     * setImageFormat() marks the current frame only, and a wand built with
     * newImage() carries no format at all, which stops a multi frame write.
     *
     * @throws ImagickException
     */
    private function setFramesFormat(var image, string extension) -> void
    {
        image->setIteratorIndex(0);

View on GitHub (pinned to b7419de9cd)