Similar to d7, d8 file_validate_image_resolution removes exif data if image is too big, which breaks this module.

Comments

StryKaizer created an issue. See original summary.

strykaizer’s picture

Status: Active » Needs review
StatusFileSize
new1.53 KB

Patch attached.

This should work for all form widgets using exif_orientation_validate_image_rotation as upload_validator

strykaizer’s picture

StatusFileSize
new1.51 KB
new536 bytes

C/P fix

othermachines’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests
Related issues: +#2344175: EXIF data gets stripped when using Maximum image resolution
StatusFileSize
new19.04 KB
new19.07 KB

I can confirm that patch in #3 also fixes the issue in #2344175: EXIF data gets stripped when using Maximum image resolution where exif data is lost if a maximum image resolution is set (which makes sense).

Edit: tested on clean 8.5.0 installation with exif_orientation 8.x-1.x-dev.

With Maximum image resolution set to 500x500 on image field:

Before patch:

Screenshot 1 - before patch

After patch:

Screenshot 2 - after patch

A working patch for 7.x is in aforementioned issue.

This should probably have tests, though? I'll update the issue. Thanks!

chrisolof’s picture

Also confirming the patch in #3 works well.

strykaizer’s picture

Status: Needs work » Reviewed & tested by the community

setting rtbc as per 2 previous comments

mglaman’s picture

Thanks, all. I'll go commit shortly.

mglaman’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, tagged 1.0.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.