added images and image preprocessing
Some checks failed
publish / publish (push) Has been cancelled

This commit is contained in:
Jannik Menzel 2025-06-26 14:10:36 +02:00
parent 1969926aae
commit 71aca4ea14
7 changed files with 25 additions and 2 deletions

View file

@ -0,0 +1,15 @@
{{ $src := .Get "src" }}
{{ $alt := .Get "alt" | default "" }}
{{ $img := resources.Get $src }}
{{ if not $img }}
{{ errorf "Bild '%s' nicht gefunden. Achte darauf, dass es in /assets/ liegt." $src }}
{{ end }}
{{ $resized := $img.Resize "1000x" }}
<img
src="{{ $resized.RelPermalink }}"
alt="{{ $alt }}"
loading="lazy"
style="max-width: 100%; height: auto;">