Skip to content

Commit

Permalink
feat: add the naturalWidth and naturalHeight query parameters for pub…
Browse files Browse the repository at this point in the history
…lic images
  • Loading branch information
razonyang committed Mar 9, 2024
1 parent 461c269 commit ab5dc99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/images/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
{{- $className := default (default "img-fluid" $siteParams.class_name) .ClassName }}
{{- $height := default (default "" .Height) ($params.Get "height" | strings.TrimSuffix "px") }}
{{- $originalHeight := 0 }}
{{- $naturalHeight := $height }}
{{- $naturalHeight := default $height ($params.Get "naturalHeight" | strings.TrimSuffix "px") }}
{{- $width := default (default "" .Width) ($params.Get "width" | strings.TrimSuffix "px") }}
{{- $originalWidth := 0 }}
{{- $naturalWidth := $width }}
{{- $naturalWidth := default $width ($params.Get "naturalWidth" | strings.TrimSuffix "px") }}
{{- $wrapperClass := "" }}
{{- $sources := slice }}
{{/* Image alignment. */}}
Expand Down

0 comments on commit ab5dc99

Please sign in to comment.