diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-09-18 04:42:50 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-09-18 04:42:50 +0300 |
commit | 4a1b3df7d03398d58e44e37dd799f6ca7c356c3d (patch) | |
tree | 54ff358328e307145c5dbaff20492c7205a3f18a | |
parent | 84bd48493c20877058b01cabf7b49ececbd0ec7d (diff) |
Optimized thumbnails.
-rw-r--r-- | layouts/index.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html index 5efb1d4..e25ed9d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -23,9 +23,11 @@ <div class="post-item-image-wrapper"> <div class="post-item-image" {{ if $image }} - style="background-image: url('{{ $image.Permalink }}')" + {{ $thumbnail := $image.Resize "690x360" }} + style="background-image: url('{{ $thumbnail.Permalink }}')" {{ else }} - style="background-image: url('{{ $featured_image | absURL}}')" + + style="background-image: url('{{ $featured_image | absURL}}')" {{ end }} ></div> </div> |