diff --git a/layouts/partials/components/image.html b/layouts/partials/components/image.html index 4e45c45..a85b628 100644 --- a/layouts/partials/components/image.html +++ b/layouts/partials/components/image.html @@ -2,6 +2,8 @@ type: string - default url: string alt: string +width: int +height: int --> {{ $avatar := "avatar"}} {{ $sizes := slice "320" "640" "960" "1280" }} @@ -16,7 +18,7 @@ alt: string {{ range $i, $size := $sizes }} {{ $dir }}/{{ $name }}-{{ $size }}{{ $ext }}.avif {{ $size }}w, {{ end }} - {{ .url }}.avif + {{ .url }}.avif {{ .width }}w " /> {{ .alt }}