public function getPublicPath()
    {
        if (! $this->isPubliclyAccessible()) {
            throw MediaUrlException::mediaNotPubliclyAccessible($this->getAbsolutePath(), public_path());
        }
        if ($this->isInWebroot()) {
            $path = str_replace(public_path(), '', $this->getAbsolutePath());
        } else {
            $path = rtrim($this->getPrefix(), '/').'/'.$this->media->getDiskPath();
        }

        return $this->cleanDirectorySeparators($path);
    }