parent
89a0e7e353
commit
311a3b1370
3 changed files with 15 additions and 7 deletions
|
|
@ -27,7 +27,9 @@ og:image:alt.
|
|||
{{- with $resource -}}
|
||||
{{- $image := . -}}
|
||||
{{- if and (eq .ResourceType "image") (ne .MediaType.SubType "svg") -}}
|
||||
{{- if gt .Width 1200 }}{{ $image = .Resize "1200x" }}{{ end -}}
|
||||
{{- /* Turned as its EXIF orientation says; Hugo doesn't do that when it resizes. */ -}}
|
||||
{{- $image = .Filter images.AutoOrient -}}
|
||||
{{- if gt $image.Width 1200 }}{{ $image = $image.Resize "1200x" }}{{ end -}}
|
||||
{{- $width = $image.Width -}}
|
||||
{{- $height = $image.Height -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue