File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 16
16
{{ $avatar := resources.Get (.src) }}
17
17
18
18
{{ if $avatar }}
19
- {{ $avatarResized := $avatar.Resize "300x" }}
20
- < img src ="{{ $avatarResized.RelPermalink }} " width ="{{ $avatarResized.Width }} "
21
- height ="{{ $avatarResized.Height }} " class ="site-logo " loading ="lazy " alt ="Avatar ">
19
+ {{ $avatarResized := $avatar.Resize "120x" }}
20
+ {{ $avatar1_5 := $avatar.Resize "180x" }}
21
+ {{ $avatar2 := $avatar.Resize "240x" }}
22
+ < img
23
+ src ="{{ $avatarResized.RelPermalink }} "
24
+ srcset ="{{$avatarResized.RelPermalink}},
25
+ {{$avatar1_5.RelPermalink}} 1.5x,
26
+ {{$avatar2.RelPermalink}} 2x "
27
+ width ="{{ $avatarResized.Width }} "
28
+ height ="{{ $avatarResized.Height }} "
29
+ class ="site-logo "
30
+ loading ="lazy "
31
+ alt ="Avatar "
32
+ />
22
33
{{ else }}
23
34
{{ errorf "Failed loading avatar from %q" . }}
24
35
{{ end }}
You can’t perform that action at this time.
0 commit comments