From b524043127246854a1877678452e2c888e63b461 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 28 Dec 2020 12:34:05 +0200 Subject: [PATCH] layouts/partials/featured.html: Orientation 6 This handles images that have EXIF orientation "RightTop" aka 6, which we need to rotate 270 degrees clockwise to make normal. See: https://www.impulseadventure.com/photo/exif-orientation.html --- layouts/partials/featured.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/featured.html b/layouts/partials/featured.html index 50af808..ef3ddb9 100644 --- a/layouts/partials/featured.html +++ b/layouts/partials/featured.html @@ -38,6 +38,10 @@ {{/* 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" }} + {{ else if eq $orientation 6 }} + {{ $RotatedImage := $image.Resize "480x600 r270" }} + + {{ else }} {{ end }}