mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Convert all images to webp when possible
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{{- $img := resources.Get .path }}
|
||||
{{- $img = $img.Resize (printf "%dx%d webp" $img.Width $img.Height) }}
|
||||
<img src="{{ $img.Permalink }}" alt="{{ .alt | default " " }}" width="{{ .width | default $img.Width }}"
|
||||
height="{{ .height | default $img.Height }}" {{- if .class}}class="{{ .class }}" {{end}}
|
||||
{{- if .style}}style="{{ .style | safeCSS | default " " }}" {{end}} />
|
||||
Reference in New Issue
Block a user