Skip to content

get_image_metadata does not handle EXIF rotation #2818

Open
@binomial0

Description

@binomial0

Bug Report

Environment

Zola version: 0.20.0 (installed from winget)

Expected Behavior

When processing an image that has rotation applied in the EXIF metadata, get_image_metadata() gives the correct (rotated) dimensions

Current Behavior

get_image_metadata() ignores the EXIF rotation and returns the unrotated dimensions.
This is not only undesirable for the user, but also inconsistent with resize_image which handles rotation correctly (compare #2445 that raised the equivalent issue there).

Step to reproduce

Use a JPEG image with EXIF rotation of 90 degrees, and call get_image_metadata with its path as an argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions