Following this howto
https://blog.vincentahrend.com/posts/independent-blog-hugo-and-dat/
it is quite easy to set up hugo so that the site is distributed via the dat protocol.
But for some reason the safeURL trick mentioned in the blog post does not work with image processing.
Here is my code.
<figure>
{{ $preview := .Resources.GetMatch "intro" }}
{{ with $preview }}
{{ $scaled := .Fill "1024x610 Gaussian Center" }}
<img class="w-100" src="{{ $scaled.Permalink | safeURL }}" alt="" />
{{ end }}
{{ end }}
{{ if .Resources.GetMatch "introsvg" }}
{{ $preview := .Resources.GetMatch "introsvg" }}
<img src="{{ $preview.Permalink | safeURL }}" alt="" />
{{ end }}
{{ $image := .Resources.GetMatch "intro*" }}
<figcaption class="f5">
{{ with $image }}
<p class="f6 sans-serif b">{{ .Title }}</p><p class="f6 sans-serif">{{ .Params.copyright }}</p>
</figcaption>
</figure>
I guess that image links are created not in the same way as Permalinks.
Is it possible at all to have processed image links starting with a dat:// baseurl?