public function thumbnail($width, $height = null)
    {
        if ($this->type != 'image') {
            throw new \LogicException("Tried to create thumbnail for not image file.", 500);
        }

        $thumbnail = new \Routegroup\Media\Helpers\Thumbnail($this);

        $filename = $thumbnail->name($width, $height);

        if ($thumbnail->exists($filename)) {
            return $this->storage->url($this->path($filename));
        }

        return $thumbnail->create($filename, $width, $height);
    }