- Issue created by @chfoidl
- Merge request !10Issue #3458955: Use constraint instead of function validator → (Open) created by chfoidl
- First commit to issue fork.
As of Drupal 10.2.0 using function validators is deprecated and a validation constraint must be used instead.
Additionally, the current implementation in hook_field_widget_single_element_form_alter
only adds the exif_orientation_validate_image_rotation
validator function if the widget already has the file_validate_image_resolution
validator function set.
This does not work anymore, because the file_validate_image_resolution
validator function has been replaced by the FileImageDimensions
validation constraint.
Use this module 8.x-1.4
in Drupal >= 10.2.
Implement a validation constraint for image exif orientation and add the new constraint in hook_field_widget_single_element_form_alter
if the widget already has the FileImageDimensions
constraint set.
Important: The changes in https://www.drupal.org/project/exif_orientation/issues/3401728 🐛 Orientation is no longer fixed if a maximum image resolution is set on the field RTBC are needed additionally for the orientation logic to work properly!
Active
1.0
Code