Looking around the forum/github/docs ive seen Hugo does not support WebP yet. Ok. I can generate webp images through the command line.
However… how can i populate a webp list with the same images just with a different filename?
If your template already works with jpg-srcsets then check the functions around that. It’s quite probable that the file gets loaded. If that’s the case then you have access to File Variables. Use .File.BaseFileName with a webp ending. For that, the base name of the files, of course, need to be identical and the files need to be next to each other in the folder.
EDIT:
oh damn, im evaluating the size inside the shortcode if ge $src.Width "640" so now i get an error because, correctly, i dont have the .webp file yet *and* hugo doesnt handle .webp anyway…
now i gotta find a way to output the images without handling them…