Hey,
i want to remove the extension from my images.
Why?
I convert my images with the “kirby webp” plugin to webp and now i want to add them to my page. And i dont know what filetypoe the original upload will be
<picture>
<source srcset="<?= $image->url() ?>" type="image/webp">
<source srcset="<?= $image->url() ?>" type="image/jpeg">
<source srcset="<?= $image->url() ?>" type="image/png">
<img src="<?= $image->resize(25)->url() ?>" alt="Alt Text!" class="lazyload">
</picture>
the problem is that the url() looks like this:
media/pages/testpage/fd870d9a58-1613134009/compressed.png
now i want to remove the extension from the url and add the images like this
<picture>
<source srcset="<?= $image->url()->removeExtensionSmh() ?>webp" type="image/webp">
<source srcset="<?= $image->url()->removeExtensionSmh() ?>jpeg" type="image/jpeg">
<source srcset="<?= $image->url()->removeExtensionSmh() ?>png" type="image/png">
<img src="<?= $image->resize(25)->url() ?>" class="lazyload">
</picture>
Any idea?
Best
Marvin