diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 4f5d8d7..846a405 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -92,13 +92,13 @@ {{- end }} {{- /* Determine id attribute. */}} -{{- $id := printf "h-rh-i-%d" .Ordinal }} +{{- $id := printf "h-rh-i-%s" (md5 $u.Path) }} {{- with .Attributes.id }} {{- $id = . }} {{- end }} {{- /* Initialize attributes. */}} -{{- $attrs := merge .Attributes (dict "id" $id "alt" .Text "title" (.Title | transform.HTMLEscape) "src" $u.String) }} +{{- $attrs := merge .Attributes (dict "id" $id "alt" .Text "title" (.Title | transform.HTMLEscape) "src" $u.Path) }} {{- /* Merge attributes from resource. */}} {{- with $r }}