public function reverseTransform($image)
    {
        if (null === $image) {
            return null;
        }

        $filename = $image->getFilename();

        if (empty($filename)) {
            return null;
        }

        if ($this->preFilename && ($this->preFilename !== $filename)) {
            $this->imageManager->remove($image);
        }

        $image = $this->imageManager->findByFilename($filename);

        if (null === $image) {
            throw new TransformationFailedException();
        }

        $image->setTemporary(false);

        return $image;
    }