- Merge request !3Issue #3256682: Apply rotation correction for existing images β (Open) created by nick dewitte
- π§πͺBelgium dieterholvoet Brussels
This is not a good idea for sites with a lot of images. Maybe add a condition that if there are more than X amount of files, no automatic update happens and the user is encouraged to do it manually or through a Drush command.
- First commit to issue fork.
- Merge request !7Added post update to process existing image exif orientations. β (Open) created by greenskin
- Status changed to Needs review
over 1 year ago 12:42am 19 January 2024 - πΊπΈUnited States greenskin
Implemented the post update to run orientation updates to existing files in batches.
- π¬π§United Kingdom nicholasthompson
I just tried the patch and got this..
15:31:10 > > [notice] Update started: exif_orientation_post_update_process_existing_images 15:31:10 > > [error] TypeError: _exif_orientation_rotate(): Argument #1 ($file) must be of type Drupal\file\FileInterface, null given, called in /var/www/html/XXX/web/modules/contrib/exif_orientation/exif_orientation.post_update.php on line 33 in _exif_orientation_rotate() (line 62 of /var/www/html/XXX/web/modules/contrib/exif_orientation/exif_orientation.module) #0 /var/www/html/XXX/web/modules/contrib/exif_orientation/exif_orientation.post_update.php(33): _exif_orientation_rotate()
- π¬π§United Kingdom nicholasthompson
I wrapped an `if ($file)` check around it and it worked... had to flush image styles too...