protected function applyCrops(array $item, FileInterface $entity) {
    // Add coordinates for cropping images.
    foreach ($item['crops'] as $crop_name => $data) {
      $crop_type = $this->entityTypeManager
        ->getStorage('crop_type')
        ->load($crop_name);

      if (!empty($crop_type) && $crop_type instanceof CropType) {
        $this->imageWidgetCropManager->applyCrop($data, [
          'file-uri' => $item['uri'],
          'file-id' => $entity->id(),
        ], $crop_type);
      }
    }
  }