I think it would be very nice to have a way to allow configuring kirby to enable lazy-loading for all images rendered by kirbytext() or toBlocks() in the config.
Example config:
return [
‘kirbytext’ => [
‘loading’ => ‘eager’
]
];
Currently I can see no way to make images load lazily without adding JavaScript to the page.
And of course the alternative owuld be
‘loading’ => ‘lazy’
For blocks, you can alter the default block snippet: https://getkirby.com/docs/cookbook/panel/block-basics#extending-core-blocks__block-snippets
For Kirbytext, I think this could be a nice idea
Thanks, that’s a nice workaround until the option is added to kirbytext(). I’ve been using the blocks field instead of a textarea for everything in new projects anyway ☺️