diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 70f38c3..4490e5f 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -8,7 +8,7 @@ {{- $caption := default .Title $customAlt }} {{- $isSVG := (eq .MediaType.SubType "svg") }} - {{- $origin := .Permalink }} + {{- $origin := . }} {{- if $isSVG }} {{- $data.SetInMap "size" "profile" "180" }} {{- $data.SetInMap "size" "tiny" "320" }} @@ -16,40 +16,46 @@ {{- $data.SetInMap "size" "medium" "1200" }} {{- $data.SetInMap "size" "large" "1800" }} {{- else }} - {{- $data.SetInMap "size" "profile" (.Fill "180x180 Center").Permalink }} - {{- $data.SetInMap "size" "tiny" (.Resize "320x").Permalink }} - {{- $data.SetInMap "size" "small" (.Resize "600x").Permalink }} - {{- $data.SetInMap "size" "medium" (.Resize "1200x").Permalink }} - {{- $data.SetInMap "size" "large" (.Resize "1800x").Permalink }} + {{- $data.SetInMap "size" "profile" "180x180 Center" }} + {{- $data.SetInMap "size" "tiny" "320x"}} + {{- $data.SetInMap "size" "small" "600x" }} + {{- $data.SetInMap "size" "medium" "1200x" }} + {{- $data.SetInMap "size" "large" "1800x" }} {{- end }}
{{- $size := $data.Get "size" }} {{- if not $isSVG }} + {{- if ne $customSize "origin" }} + {{- end }} {{- end }}