public function getUrl(string $conversionName = ''): string
    {
        if ($this->hasFile()) {
            return $this->getFile()->getUrl();
        }
        return $this->getCollection()->getDefaultMediaUrl();
//        $urlGenerator = UrlGeneratorFactory::createForMedia($this);
//        if ($conversionName !== '') {
////            $conversion = ConversionCollection::createForMedia($this)->getByName($conversionName);
////            $urlGenerator->setConversion($conversion);
//        }
//        return $urlGenerator->getUrl();
    }
public function getUrl(string $conversionName = ''): string
    {
        if ($this->hasFile()) {
            return $this->getFile()->getUrl();
        }
        return $this->getCollection()->getDefaultMediaUrl();
//        $urlGenerator = UrlGeneratorFactory::createForMedia($this);
//        if ($conversionName !== '') {
////            $conversion = ConversionCollection::createForMedia($this)->getByName($conversionName);
////            $urlGenerator->setConversion($conversion);
//        }
//        return $urlGenerator->getUrl();
    }
public function getUrl ( string $ conversionName = '' ) : string { if ( $ this -> hasFile ( ) ) { return $ this -> getFile ( ) -> getUrl ( ) ; } return $ this -> getCollection ( ) -> getDefaultMediaUrl ( ) ; //        $urlGenerator = UrlGeneratorFactory::createForMedia($this); //        if ($conversionName !== '') { ////            $conversion = ConversionCollection::createForMedia($this)->getByName($conversionName); ////            $urlGenerator->setConversion($conversion); //        } //        return $urlGenerator->getUrl(); }
Get the url to a original media file.

@param string $conversionName

@return string
Get the url to a original media file .