Why is the default image handling just so rudimentarily?

I know, provoking headline but I would like to understand something. Every now and then when I work with Kirby I stumble over the issue that I don’t get why the build in image handling is so rudimentarily.

Why do I have to override the image tag if I would like to have something as srcset and sizes? Shouldn’t that be default in 2020? I know that it needs to be configured but why not have a default fallback - people setting up Kirby should be able to understand that they need to configure that stuff to their needs.

I now there is something like the srcset plugin but that won’t override the image tag, then you have to deal with different image tags…

I’m not a full time developer, I just like to fiddle around with stuff, but this is something I’m always struggling with and I’ve the feeling that this isn’t something we should deal with in the first place to build something.

This should be build in; with background image resizing; maybe even wepP support. Make it as easy as possible to build a fast website - delivering text and images to browsers in the fastest possible way using the lowest needed bandwidth, without the need to deal with plugins (and get the plugins to work with each other. Having a flash on first load or no thumbnails at all before they are requested; even in the panel? I deal with people that get confused when an image doesn’t show up there immediately.

Let people who would like to use external services and plugins use them, I get that there is a need to make it as customisable as possible. But shouldn’t the default be, that images are not the reason you can’t get a 100% in lighthouse without jumping through hoops.

Maybe also look at it from a sustainability point of view the default shouldn’t be that a bare Kirby delivers large images to devices that can’t handle them, extending load time and bandwidth.

Is it just me, is everyone else fine with that, am I just missing something? :blush: @bastianallgeier @texnixe

Yes, I think the image tag should have a srcset option without plugin and there is already an idea issue you might want to upvote: https://github.com/getkirby/ideas/issues/418

I agree that the image tag should have srcset support by default.

But keep in mind that srcset or picture elements are no plug & play solutions in any scenario. There’s no good default for them. It always depends highly on the design of your site. How wide is the main container of your site? Do you use a grid system with columns within that container? How wide are the images within those columns finally? How much compression / down-scalin are you willing to take? That’s why I’m really not sure if we should always switch on a certain srcset by default. What would be the values for it? But I think it should be super easy to enable it, just like in the examples in the Github thread.

I moved the issue to our kirby repo to get it started. It somehow got buried between all the other ideas.

3 Likes

Hello, vacation time is fiddling time and marry Christmas to all of you:) I tried to follow up on this one @bastianallgeier but couldn’t find the issue you moved into the repo, maybe you could give me a hint? never mind, seems to be closed without being resolved.

@Designscheu Like all ideas, it was moved to our feedback channel, where you can upvote it: https://kirby.nolt.io/112