Closed nicokaiser closed 5 months ago
Instead of trying to calculate the image orientation, use the new images.AutoOrient filter from Hugo 0.121.2. https://gohugo.io/functions/images/autoorient/
images.AutoOrient
- {{ $thumbnail := ($image.Fit (printf "%s %s" "600x600" .rotation)) }} - {{ $full := ($image.Fit (printf "%s %s" "1600x1600" .rotation)) }} + {{ $thumbnail := $image.Fit "600x600" | images.Filter images.AutoOrient }} + {{ $full := $image.Fit "1600x1600" | images.Filter images.AutoOrient }}
This would require to bump the minimal Hugo version.
Fixed in v4.0.2
Instead of trying to calculate the image orientation, use the new
images.AutoOrient
filter from Hugo 0.121.2. https://gohugo.io/functions/images/autoorient/