add webp conversion on member single page

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1693381142243034077/jamesk-patch-1
Toshaan Bharvani 3 years ago
parent d4a7f56e56
commit 10b5c70bf1

@ -11,7 +11,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "500x500" }} {{ $image := $imageresource.Fit "500x500 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}">
{{ else }} {{ else }}
<h3 class="section-title">{{ .Title }}</h3> <h3 class="section-title">{{ .Title }}</h3>

Loading…
Cancel
Save