Kirby srcset vs imgix type service?

Im just playing around with how srcset works in Kirby 3. Im curious are their any advantages to using a service like imgix over srcset in Kirby 3?

Or are services like that more aimed at high traffic sites that utilize a lot of images?

Personally, I’m not really attracted to services like imgix because Kirby has a lot of image-transformation functions (resize, crop, …) built-in. Image optimization stuff is AFAIK not really built-in (is it?), but I believe it should be possible to extend this via a custom plugin.

What imgix also has, is a CDN. Kirby obviously doesn’t have that.
But it can also be implemented via plugins afaik — possibly on a cheaper CDN that doesn’t have that image manipulation functionality. e.g. is using the keyCDN service via a plugin.

No, but there are multiple ways to optimize your images locally in your development workflow.

The website uses Cloudinary for image optimization and as a CDN for images.

keyCDN is used for other assets.

1 Like

So does that mean that (say for a small site) I wouldn’t need to use anything like imgix for my images? Just have srcset and Kirby generating sizes for different breakpoints?

IMO, that’s enough for small sites, additionally, you can implement additional lazy loading. Whether or not you need an additional CDN depends on whether or not you’re targeting an international audience.

Thanks for your advice :smiley:

This post here has some good advice on finding the right compromise between image size and compression: General question regarding optimised images, compression and best practice going forward

you could also optimize the images files in the kirby public media folder (which are used in srcsets) if you want to keep the files hosted on the same server and not on a cdn.
i created a plugin for the popular imageoptim api (free trial) to do exactly that.

1 Like