mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 03:22:17 +00:00
Bump the quality of image renders
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
<article class="media">
|
||||
<figure class="media-left">
|
||||
<p class="image is-64x64">
|
||||
<img class="is-rounded" src="https://www.gravatar.com/avatar/{{ sha256 .Params.author_email }}">
|
||||
{{ $avatar := resources.GetRemote (print "https://www.gravatar.com/avatar/" (sha256 .Params.author_email)) | resources.Copy (print "images/avatars/" (sha256 .Params.author_email) ".jpg") }}
|
||||
<img class="is-rounded" src="{{ $avatar.Permalink }}">
|
||||
</p>
|
||||
</figure>
|
||||
<div class="media-content">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $img = $img.Resize (print (default "1256x" $width) " jpg") }}
|
||||
{{ $img = $img.Resize (print (default "1264x" $width) " webp") }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $class := .Get "class" }}
|
||||
<figure class="image{{ if $class }} {{ $class }}{{ end }}">
|
||||
|
||||
Reference in New Issue
Block a user