humanmade / humanmade/tachyon-plugin
Reverse width and height for images rotated 90 degrees
- Dominant language
- PHP
- Stars
- 86
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
WordPress does not modify images containing an EXIF orientation (eg from an iPhone), this causes the width and height to be recorded in the meta data incorrectly for images rotated 90 degrees.
When processing images, the sharp library does rotate images containing an EXIF orientation.
This can lead to an incorrect crop via Tachyon as the Tachyon Plugin sets the arguments to `fit={height},{width}`.
To crop the image correctly, the meta data's width and height need to be reversed for images rotated 90 degrees.
See peterwilsoncc/doitlive.peterwilson.cc#73 for a sample filter on the hook `wp_get_attachment_metadata`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.