The logic was incorrect here, which caused some images to be missed because some images have EXIF data but do not have orientation 8.
This commit is contained in:
@ -38,10 +38,12 @@
|
|||||||
{{/* Rotate image before cropping because Hugo's "Smart" cropping crops differently if we do it at the same time as .Fill with a rotation) and use 2x dimensions to keep the thumbnail crisp */}}
|
{{/* Rotate image before cropping because Hugo's "Smart" cropping crops differently if we do it at the same time as .Fill with a rotation) and use 2x dimensions to keep the thumbnail crisp */}}
|
||||||
{{ $RotatedImage := $image.Resize "480x600 r90" }}
|
{{ $RotatedImage := $image.Resize "480x600 r90" }}
|
||||||
<img src={{ ($RotatedImage.Fill "480x600").RelPermalink }} width="240" height="300" />
|
<img src={{ ($RotatedImage.Fill "480x600").RelPermalink }} width="240" height="300" />
|
||||||
|
{{ else }}
|
||||||
|
<img src={{ ($image.Fill "480x600").RelPermalink }} width="240" height="300" />
|
||||||
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src={{ ($image.Fill "480x600").RelPermalink }} width="240" height="300" />
|
<img src={{ ($image.Fill "480x600").RelPermalink }} width="240" height="300" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user