Fix ressource.Fit not resizing the image properly

Co-authored-by: vlebert <vlebert@tactis.fr>
This commit is contained in:
vlebert 2021-06-03 12:09:08 +02:00 committed by GitHub
parent b5fe77f876
commit 3421c99ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@
{{ $logoImage:= resources.Get .logo}}
{{ if $logoImage }}
{{ $logoImage := $logoImage.Fit "24x24" }}
{{ $logoImage = $logoImage.Fit "24x24" }}
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}

View file

@ -7,7 +7,7 @@
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage := $logoImage.Fit "24x24" }}
{{ $logoImage = $logoImage.Fit "24x24" }}
{{ end }}
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />