summaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/img-center.html2
-rw-r--r--layouts/shortcodes/img-pull-right.html2
-rw-r--r--layouts/shortcodes/youtube.html6
3 files changed, 5 insertions, 5 deletions
diff --git a/layouts/shortcodes/img-center.html b/layouts/shortcodes/img-center.html
index 398ccccf..57365077 100644
--- a/layouts/shortcodes/img-center.html
+++ b/layouts/shortcodes/img-center.html
@@ -3,7 +3,7 @@
{{- $img := resources.Get $path }}
{{- $caption := .Get 1 }}
{{- $source := .Get 2 }}
-{{- $img = $img.Resize "500x" }}
+{{- $img = $img.Resize "500x webp" }}
<figure>
<img class="centered" alt="{{ $caption }}" src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<figcaption>
diff --git a/layouts/shortcodes/img-pull-right.html b/layouts/shortcodes/img-pull-right.html
index 7cf1238e..8d73f482 100644
--- a/layouts/shortcodes/img-pull-right.html
+++ b/layouts/shortcodes/img-pull-right.html
@@ -1,6 +1,6 @@
{{- $file := .Get 0 }}
{{- $path := printf "content_images/%s" $file}}
{{- $img := resources.Get $path }}
-{{- $img = $img.Resize "150x" }}
+{{- $img = $img.Resize "150x webp" }}
{{- $caption := .Get 1}}
<img class="float-right" alt="{{ $caption }}" src="{{ $img.Permalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html
index 0b889329..4e38c50b 100644
--- a/layouts/shortcodes/youtube.html
+++ b/layouts/shortcodes/youtube.html
@@ -1,11 +1,11 @@
{{- $id := .Get 0 }}
{{- $title := .Get 1 }}
{{- $path := printf "ytcovers/%s.jpg" $id}}
-{{- $image := resources.Get $path }}
-{{- $image = $image.Resize "x300" }}
+{{- $img := resources.Get $path }}
+{{- $img = $img.Resize "x300 webp" }}
<center>
<a href="https://www.youtube.com/watch?v={{$id}}" target="_blank">
- <img src="{{$image.Permalink}}" alt="{{$title}} on Youtube"/>
+ <img src="{{$img.Permalink}}" alt="{{$title}} on Youtube" width="{{$img.Width}}" height="{{$img.Height}}"/>
</a>
</center>