diff --git a/src/Controller/Api/MediaController.php b/src/Controller/Api/MediaController.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Api/MediaController.php
+++ b/src/Controller/Api/MediaController.php
@@ -357,7 +357,7 @@ class MediaController
      */
     protected function getMedium($id = null)
     {
-        $media = $this->mediaManager->findOneBy(['id' => $id]);
+        $media = $this->mediaManager->find($id);
 
         if (null === $media) {
             throw new NotFoundHttpException(sprintf('Media (%d) was not found', $id));
Used find method to get entity by ID