PHPackages                             tobimori/kirby-magick-extended - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tobimori/kirby-magick-extended

AbandonedArchivedKirby-plugin[Utility &amp; Helpers](/categories/utility)

tobimori/kirby-magick-extended
==============================

Make GIFs work in Kirby

1.1.0(3y ago)1175MITPHPPHP &gt;=8.0.0

Since Feb 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tobimori/kirby-magick-extended)[ Packagist](https://packagist.org/packages/tobimori/kirby-magick-extended)[ Docs](https://github.com/tobimori/kirby-magick-extended#readme)[ GitHub Sponsors](https://github.com/tobimori)[ RSS](/packages/tobimori-kirby-magick-extended/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

[![Kirby ImageMagick Extended Banner](./.github/banner.png)](./.github/banner.png)

Kirby ImageMagick Extended
==========================

[](#kirby-imagemagick-extended)

This plugin extends Kirby's built-in ImageMagick driver with features for working with animated or multi-layer images.

The issue
---------

[](#the-issue)

When converting an animated image to another format, ImageMagick converts each frame individually and outputs them as separate files with suffixes. This is not ideal for Kirby, as it expects the output to be a single image file. This plugin solves the issue by checking each image upfront converting for its frame count, and will then specify to convert the first frame only if the target format does not support multiple frames. It also adds a new option `frame` to manually specify the frame index. Additionally, this plugin adds support for `APNG`s images, which are unsupported because ImageMagick by default needs to be told to treat them as animated images.

The detection of available image frames requires the `identify` command to be available, which can be seen as breaking change, hence the creation of this plugin as it's unlikely to be merged in Kirby Core for fixing a variety of very niche edge case scenarios.

Requirements
------------

[](#requirements)

- Kirby 3.8+
- PHP 8.0+
- ImageMagick 7.0+ with `convert` and `identify` commands

Installation
------------

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-magick-extended`.

### Composer

[](#composer)

```
composer require tobimori/kirby-magick-extended

```

Usage
-----

[](#usage)

### Set driver in config

[](#set-driver-in-config)

```
// site/config/config.php

return [
  'thumbs.driver' => 'im-extended',
];
```

When applied, the plugin will already automatically detect animated images and convert only the first frame, if the target format is unsupported.

### Use `frame` option

[](#use-frame-option)

```
// In your template file
