Skip to content

Commit

Permalink
removed and replaced dep function
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbuyunhe committed Oct 19, 2023
1 parent 94dcf13 commit e9c1858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/MediaThumbnail/MediaThumbnailJp2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

}

Expand Down

0 comments on commit e9c1858

Please sign in to comment.