Skip to content

Image optimising removed EXIF-data #6868

@Froelund

Description

@Froelund

Describe the bug

When uploading images, with the "Enable size optimization" enabled, the EXIF data is being removed. The consequence for us, is that the rotation flag is missing, and we do not have anyway to know in which rotation the image should be displayed.

Steps to reproduce the behavior

  1. With the "Enable size optimization" enabled in /admin/settings/media-library.
  2. Upload an image taken in portrait-mode.
  3. Open the image from /admin/plugins/upload.

Now you'll see that the image is tilted 90 degrees.

  1. Now with the "Enable size optimization" disabled in /admin/settings/media-library.
  2. Upload an image taken in portrait-mode.
  3. Open the image from /admin/plugins/upload.

Now you'll see that the image is upright, as expected.

Expected behavior

Image should "keep" it's meta-date. Sharp library has a feature for doing that called withMetadata.

Screenshots

image

System

  • Node.js version: v12.16.3
  • NPM version: 6.14.4
  • Strapi version: 3.0.2
  • Database: Postgres
  • Operating system: Ubuntu/OSx

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersissue: bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: core:uploadSource is core/upload package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions