Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotateImagesOnUploadByExifData is not respected when uploading images #2709

Closed
aelvan opened this issue Apr 8, 2018 · 1 comment
Closed
Assignees
Labels
bug severity:normal Bugs that affect typical usage

Comments

@aelvan
Copy link

aelvan commented Apr 8, 2018

Description

When uploading images that have rotation exif data, the image is not rotated, even if rotateImagesOnUploadByExifData is set to true in the config.

In fact, as far as I can tell, cleanImage in services/Images.php is only run when replaceAssetFile in services/Assets.php is triggered. If I upload and image, and then replace the file with the same one, it works as expected; the image is rotated on upload.

cleanImage also contains code to sanitize SVGs, so should probably be run on all uploads.

Steps to reproduce

  1. Set 'rotateImagesOnUploadByExifData' => true in general.php.
  2. Upload an image with exif rotation data (attached is an example).
  3. Observe that the thumbnail shown in Assets, is not rotated.

Additional info

  • Craft version: 3.0.1
  • PHP version: 7.0.27
  • Database driver & version: MySQL 5.6.38
  • Plugins & versions: -

dd9763cc35b2

@andris-sevcenko andris-sevcenko self-assigned this Apr 8, 2018
@mrtpain
Copy link

mrtpain commented Apr 15, 2018

+1 - same issue on version 2.6.3015 except my setting is set to false and rotation still occurs.

@andris-sevcenko andris-sevcenko added bug severity:normal Bugs that affect typical usage labels Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug severity:normal Bugs that affect typical usage
Projects
None yet
Development

No branches or pull requests

3 participants