public function apply($aliasName = null)
    {
        $reset = false;
        if ($aliasName === null) {
            $aliasName = $this->mediaManager->getOriginalDir();
            $reset = true;
        }

        $this->updateFile($this->image);
        $this->updateFocus($this->media);

        $fs = $this
            ->mediaManager
            ->getFilesystemManipulator();

        $fs->saveContent(
            $aliasName.'/'.$this->media->getReference(),
            $this->image->get($this->media->getExtension())
        );

        $this->mediaManager
            ->setSizeWidthAndHeight($this->media)
            ->save($this->media);

        if ($reset === true) {
            $this->mediaManager->reset($this->media);
        }
    }