diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b8731cd..7a4d32f 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -26,10 +26,12 @@
{{- if in $rasters $img.MediaType.SubType -}}
- {{- $img = $img.Resize (printf "x%d" $maxHeight) -}}
-
+ {{- if gt $img.Height $maxHeight -}}
+ {{- $img = $img.Resize (printf "x%d webp q50" $maxHeight) -}}
+ {{- end -}}
+
{{ else }}
-
+
{{ end }}
{{ end }}