gatsby-plugin-image: gatsbyImageData does not respect the orientation meta data #30703
Unanswered
danielmoessner
asked this question in
Help
Replies: 1 comment 6 replies
-
I found out: |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
gatsby-plugin-image: gatsbyImageData doesn't respect the orientation metadata on images and changes the aspectRatio if the orientation is for example LeftBottom. It should not change the aspect Ratio.
Steps to reproduce
Update: It does not happen everywhere. Actually it only happens with my specific images. I've created a repo where the problem is reproduced: https://github.com/danielmoessner/issue
The problem
The problem is that gatsbyImageData does not respect the Orientation meta data. In my specific case the Orientation is set to LeftBottom which gatsby-plugin-image doesn't recognize. This leads to the image being cropped top and bottom.
The fix
gatsbyImageData should check the Orientation meta data of the images and adapt the width and height correspondingly.
Expected result
The image's aspectRatio should not change.
Actual result
The aspectRatio changed.
Environment
The environtment doesn't really matter but here it is:
npmPackages:
gatsby: ^3.2.1 => 3.2.1
gatsby-image: ^3.2.0 => 3.2.0
gatsby-plugin-eslint: ^3.0.0 => 3.0.0
gatsby-plugin-image: ^1.2.0 => 1.2.0
gatsby-plugin-manifest: ^3.2.0 => 3.2.0
gatsby-plugin-netlify: ^3.2.0 => 3.2.0
gatsby-plugin-netlify-cms: ^5.2.0 => 5.2.0
gatsby-plugin-postcss: ^4.2.0 => 4.2.0
gatsby-plugin-react-helmet: ^4.2.0 => 4.2.0
gatsby-plugin-sharp: ^3.2.0 => 3.2.0
gatsby-plugin-sitemap: ^3.2.0 => 3.2.0
gatsby-remark-images: ^4.2.0 => 4.2.0
gatsby-source-filesystem: ^3.2.0 => 3.2.0
gatsby-transformer-remark: ^3.2.0 => 3.2.0
gatsby-transformer-sharp: ^3.2.0 => 3.2.0
gatsby-transformer-yaml: ^3.2.0 => 3.2.0
npmGlobalPackages:
gatsby-cli: 2.16.1
Beta Was this translation helpful? Give feedback.
All reactions