From e9c18588d5237e4820d5a25e5739efdaca2d0891 Mon Sep 17 00:00:00 2001 From: Jeff He Date: Thu, 19 Oct 2023 19:51:53 -0400 Subject: [PATCH] removed and replaced dep function --- src/Plugin/MediaThumbnail/MediaThumbnailJp2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin/MediaThumbnail/MediaThumbnailJp2.php b/src/Plugin/MediaThumbnail/MediaThumbnailJp2.php index fca62bb..d3fe5a1 100644 --- a/src/Plugin/MediaThumbnail/MediaThumbnailJp2.php +++ b/src/Plugin/MediaThumbnail/MediaThumbnailJp2.php @@ -54,7 +54,7 @@ public function createThumbnail($sourceUri) { $im->destroy(); // Return a new managed file object using the generated thumbnail. - return file_save_data($image, $sourceUri . '.jpg'); + return \Drupal::service('file.repository')->writeData($image, $sourceUri . '.jpg'); }