Is it possible to remove the file extension within content blocks when using an image type when outputting the imagetype (jpg, png…) ?
currently i use a template in contentblocks such as: this one
<div class="col-lg-8 bg-jet-radial-smaller d-flex align-items-center">
<img src="/[[+image]]"
class="img-fluid py-3 mt-5 mt-lg-0"
alt="[[+imageseo]]">
</div>
the [[+image]] is an field with the type > image and the output tpl [[+url]]. the result is, i got the correct image url. So far everything is great!
Now I want to work with webp, but the editors should continue to upload further their JPG, PNG. On the server side, the uploaded images are converted into webp, so I would like to have the following template as example
<div class="col-lg-8 bg-jet-radial-smaller d-flex align-items-center">
<picture>
<source srcset="[[+image]].webp" type="image/webp">
<source srcset="[[+image]].jpg" type="image/jpeg">
<img src="[[+image]].jpg">
</picture>
</div>
in this case it was important that my [[+image]] output is with the original image ending/type.
I also looked in the classes at contentblocks: core/components/contentblocks/elements/inputs/imageinput.class.php
but only [url] is used here. I need somthing like [url-without-type]