Function file_validate_image_resolution is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0.

Created on 13 February 2025, 11 days ago

Problem/Motivation

The rotation is made on a upload_validator checking file_validate_image_resolution, but file_validate_image_resolution is removed on Drupal 11.

function exif_orientation_field_widget_single_element_form_alter(&$element, FormStateInterface $form_state, $context) {
  if (isset($element['#upload_validators']['file_validate_image_resolution'])) {
    $element['#upload_validators'] = ['exif_orientation_validate_image_rotation' => []] + $element['#upload_validators'];
  }
}

Message from function:

function file_validate_image_resolution(FileInterface $file, $maximum_dimensions = 0, $minimum_dimensions = 0) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700', E_USER_DEPRECATED);
  $errors = [];

So the module is not compatible with Drupal 11.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024