This repository was archived by the owner on Feb 13, 2022. It is now read-only.

Description
Question
Override default Kibytext image tag
Answer
Overriding even just as an option might conflict with various other plugins.
Create a kirbytext:before hook and do a text replace if you really want this.
Or just use the srcset tag right from the start.
(srcset: myfile.jpg)
(srcset: myfile.jpg preset: breakpoints)
(srcset: myfile.jpg lazy: true)
(srcset: myfile.jpg preset: breakpoints lazy: true)
/site/config/config.php
return [
'hooks' => [
'kirbytags:before' => function ($text, $data, $options) {
return str_replace('(image:', '(srcset:', $text);
}
]
]