tweak thumbnail generation for higher quality https://git.autonomic.zone/ruangrupa/lumbung.space/issues/39 #40

Merged
decentral1se merged 3 commits from r/lumbung.space:main into main 2022-03-04 11:38:20 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@
{{ with (index (.Resources.ByType "image") 0) }}
{{ $height := add .Height 0.0}}
{{ $ratio := div $height .Width}}
{{ $thumb := .Fit "540x360"}}
{{ $thumb := .Fit "540x540 q80 webp"}}
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a>
@ -32,4 +32,4 @@
</a>
</footer>
</article>
</div>
</div>

View File

@ -13,7 +13,7 @@
{{ with (index (.Resources.ByType "image") 0) }}
{{ $height := add .Height 0.0}}
{{ $ratio := div $height .Width}}
{{ $thumb := .Fit "540x360"}}
{{ $thumb := .Fit "540x540 q80 webp"}}
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a>