diff options
author | serg <contact@sergfurtak.com> | 2020-03-15 15:09:01 +0300 |
---|---|---|
committer | serg <contact@sergfurtak.com> | 2020-03-15 15:09:01 +0300 |
commit | 9d2cf82191277c5d3e7b0eae89aa3b0f1cf4be30 (patch) | |
tree | f0a87c43731bded47ae198545b2faaf6395ab3c4 | |
parent | 5ac1ac19e1dc109a73e5a613624c5a64ce18f582 (diff) |
fix of getting the real width for image
-rw-r--r-- | layouts/partials/modules/image.html | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/layouts/partials/modules/image.html b/layouts/partials/modules/image.html index 79e6b08..9e9b6dc 100644 --- a/layouts/partials/modules/image.html +++ b/layouts/partials/modules/image.html @@ -9,8 +9,7 @@ {{with .params}} {{range (last (sub (len .) 1) .)}} {{$image := partial "func/GetImage" (dict "bundle" $imageBundle "path" $path "cmd" .cmd "options" .options)}} - {{$width := index (split .options "x") 0}} - {{$srcset = $srcset | append (print ($image.RelPermalink) " " $width "w")}} + {{$srcset = $srcset | append (print ($image.RelPermalink) " " $image.Width "w")}} {{end}} {{end}} |