Ensures that image orientation is according to exif data.

Parameters

\Drupal\file\FileInterface $file: A file entity. This function may rotate the file.

Return value

array An empty array.

See also

hook_file_validate()

File

./exif_orientation.module, line 44

Code

function exif_orientation_validate_image_rotation(FileInterface $file) {
    _exif_orientation_rotate($file);
    // This validator did not produce any errors.
    return [];
}