V0.130.0 generates incorrectly oriented images compared to v0.129

$ hugo version
hugo v0.130.0-9b1b11c8a59a900458e9e460f197a44367c022ee+extended windows/amd64 BuildDate=2024-07-29T13:51:56Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes

In 0.130.0, the following config generates images that do not reliably have the same orientation as the original image. Hugo version 0.129 correctly processes the images. Guessing this may have something to do with the exif library change. I checked the documentation for any changes in how this is used but couldn’t see any differences.

[imaging]
  quality = 75
  resampleFilter = "Lanczos"
  [imaging.exif]
    disableDate = false
    disableLatLong = true
    includeFields = "ImageDescription|Orientation"

Hmm … I guess you use images.AutoOrient …

Yes, that’s most likely my … fault.

Do you have a problematic image you can share with me? You can send it to bjorn.erik.pedersen@gmail.com and I will throw it away when I have looked at it.

Never mind, I see that the AutoOrient filter function hasn’t gotten a single test, which is a lesson learned, so I now see what it is. There’s an assumption of the return type there that does not hold water. I will fix it.

2 Likes