ImageMagick thumb driver implementation using Imagick API

I needed to use ImageMagick as my thumb driver because I wanted to create GIF thumbnails automatically and GDlib doesn’t support that.

Then I found out my web hosting provider doesn’t support executing shell commands from user scripts, probably for security reasons, but unfortunately that’s exactly how Kirby uses ImageMagick.

However, the hosting provider does support calls to the Imagick API so I rewrote the commands to the API calls.

https://gist.github.com/jmedveckyh/4e2441b898e7be1aa664e890bcc19274

Feel free to use this code (just place the script in your site/plugins folder and enable it in config.php).
Maybe this will help someone in a similar situation :slight_smile:

1 Like

You can create your own driver, no need to modify the source code.

http://k2.getkirby.com/docs/developer-guide/toolkit/thumb-driver

thats cool! edited the original post

Hi @jmedveckyh

Sorry for reviving this 4 years old conversation, but I’m running into the same problem!

I get a 404 when I click the link for your code. Do you still have this code available somewhere? (or maybe a kirby 3 version? :pray:t2::sweat_smile:)

Thanks!

Hey,

no problem - i found the gist is still up but i renamed my github profile, so the new link is

Hi,

Thanks! This is helpful.

If I manage to make a Kirby 3 (or Kirby 4) version, I’ll post it here.

Hey @texnixe ,

Is there an updated guide for kirby 4?
I’d love to avoid changing the kirby source code :slight_smile:

Thanks!

(I’m aware this post is super old, but I assume most people with this issue will still land here)

Not sure what guide you mean? Maybe check out Vips thumbnail | Kirby CMS Plugins for an example thumb driver replacement.

Thanks, this helps!

I meant the old guide you posted in 2019. I thought it would be automatically attached as a quote when I hit “reply”, don’t expect you to remember it of course :exploding_head: I meant this one:

I was just curious if one exists for kirby 4, but I can also figure it out by checking the example. All good, thanks again.