mediaMetadataService = $mediaMetadataService; } public function update(ArtistImageUpdateRequest $request, Artist $artist) { $this->mediaMetadataService->writeArtistImage( $artist, $request->getFileContentAsBinaryString(), $request->getFileExtension() ); event(new LibraryChanged()); return new JsonResponse(['imageUrl' => $artist->image]); } }