Skip to content

Commit

Permalink
image: unify #824
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Apr 7, 2024
1 parent 86b53ec commit 46e7e5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/partials/shortcodes/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{{- end }}
{{- $height := "auto" }}
{{- $width := "auto" }}
{{- $attributes := .attributes | default dict }}
{{- $dest_url := urls.Parse $url }}
{{- $dest_path := $dest_url.Path }}
{{- $image := "" }}
Expand Down Expand Up @@ -76,7 +77,7 @@
{{- $classes = $classes | append $c }}
{{- end }}
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
{{- $attributes := merge .attributes (dict "alt" $alt "src" $url "title" $title) }}
{{- $attributes = merge $attributes (dict "alt" $alt "src" $url "title" $title) }}
{{- if $effects.lazy }}
{{- $attributes = merge $attributes (dict "loading" "lazy") }}
{{- end }}
Expand Down

0 comments on commit 46e7e5e

Please sign in to comment.