diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
index 42db633..9792dd3 100644
--- a/layouts/shortcodes/img.html
+++ b/layouts/shortcodes/img.html
@@ -34,7 +34,7 @@
{{ with $caption }}
- {{ . }}{{ with $source.Params.credits }}({{ . | $.Page.RenderString }}){{ end }}
+ {{ . }}{{ with $source.Params.credits }} ({{ . | $.Page.RenderString }}){{ end }}
{{ end }}