diff --git a/layouts/shortcodes/img-resized.html b/layouts/shortcodes/img-resized.html index 9ffbaf8..8f012aa 100644 --- a/layouts/shortcodes/img-resized.html +++ b/layouts/shortcodes/img-resized.html @@ -1,4 +1,7 @@ {{ $original := .Page.Resources.GetMatch (.Get "src") }} -{{ $resized := $original.Resize "820x webp" }} +{{ $image := $original }} +{{ if gt $original.Width 820 }} + {{ $image = $original.Resize "820x webp" }} +{{ end }} - \ No newline at end of file + \ No newline at end of file