Skip to content

Commit

Permalink
fix: use Permalink instead of RelPermalink for modern formatted images (
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Feb 22, 2024
1 parent 1e8508e commit 46d32ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layouts/partials/images/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@
{{/* Modern format. */}}
{{- if and $modernFormat (ne $modernFormat $res.MediaType.SubType) (in $formats $res.MediaType.SubType) }}
{{- $modernImg := partial "images/functions/format" (dict "Img" $res "Format" $modernFormat) }}
{{- $sources = $sources | append (dict "srcset" $modernImg.RelPermalink "type" $modernImg.MediaType) }}
{{/* TODO: use Permalink instead, since the processed resources will not published to other sites. */}}
{{/* See https://github.com/gohugoio/hugo/issues/12110. */}}
{{- $sources = $sources | append (dict "srcset" $modernImg.Permalink "type" $modernImg.MediaType) }}
{{- end }}
{{/* Reset image properties. */}}
{{/* TODO: use Permalink instead, since the fingerprint resources will not published to other sites. */}}
Expand Down

0 comments on commit 46d32ca

Please sign in to comment.