Kirby 3 Imgix plugin

Hey there!

We would like to use imgix for images, so I thought writing a custom thumb generator is probably the best form of integrating it, since it would just mean calling $image->thumb().

I’ve had a look at the official docs and copy pasted the code. For imgix the only thing that needs to happen is replacing the hostname of the image URL:


Kirby::plugin('diesdasdigital/imgix-thumb', [
    'components' => [
        'thumb' => function (App $kirby, string $src, string $dst, array $options) {
            return "".$src;

But calling the $image->thumb()->url() still returns the old url. What do I need to change?

For thumb urls you have to use the fileversion component:

Example plugin for Cloudinary:

Thanks a lot! Will give this a try :slight_smile:

Thanks that worked well. I’ve published a composer package so that others have an easier time than me. :slight_smile:


That’s awesome! I just added it to the directory.

1 Like