File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 36
36
{{- if $cmSrc -}}
37
37
{{ $cmSrc.RelPermalink | absURL}} 1080w
38
38
{{- else -}}
39
- // hugo not support avif format
40
- {{ if (ne $imageType "avif") }}
41
- {{- with $respSizes -}}
42
- {{- range $i, $e := . -}}
43
- {{- if $i }}, {{ end -}}{{- ($src.Resize (print . "x " $imageType $hint " " $filter) ).RelPermalink | absURL }} {{ . }}w
44
- {{- end -}}
45
- {{- end -}}" sizes="{{ $dataSzes }} " />
46
- {{- end -}}
47
- {{- end -}}
39
+ // hugo not support avif format
40
+ {{ if ne $imageType "avif" }}
41
+ {{- with $respSizes -}}
42
+ {{- range $i, $e := . -}}
43
+ {{- if ge $src.Width . -}}
44
+ {{- if $i }}, {{ end -}}{{- ($src.Resize (print . "x " $imageType " " $filter) ).RelPermalink | absURL}} {{ . }}w
45
+ {{- end -}}
46
+ {{- end -}}
47
+ {{- end -}}
48
+ {{ end }}
49
+ {{- end -}}" sizes="{{ $dataSizes }} " />
48
50
{{- end -}}
49
51
{{- end }}
50
52
< img loading ="lazy " src ="{{ $src }}{{- if eq ($align) "center " }}#center{{- end }}"
You can’t perform that action at this time.
0 commit comments