public function saveThumbnail(MediaInterface $media, $url)
    {
        $thumb = $this->mediaManager->createMedia();

        $thumb
            ->setStatus(Media::STATUS_HASPARENT)
            ->setName($media->getName().'_thumb')
            ->setProvider('image')
        ;

        $filename = '/tmp/'.basename($url);
        $filesystem = new Filesystem();
        $filesystem->dumpFile($filename, file_get_contents($url));
        $thumb->temp = $filename;
        $thumb->setFile(new UploadedFile($filename, basename($url)));

        $this->mediaManager->save($thumb);

        return $thumb;
    }