public function getAliasAndKey(MediaInterface $media, $alias = null)
    {
        $aliasManipulator = $this->aliasManipulatorFactory->setAlias($alias);

        if ($media->getType() === $media::IMAGE) {
            $alias = $aliasManipulator->getAliasName();

            if ($alias !== $this->originalDir) {
                $this->cropImage($media, $aliasManipulator);
            }
        } else {
            $alias = $this->originalDir;
        }

        return $alias.'/'.$media->getReference();
    }