public function getImageUrl($type = ''): string
    {
        if ($this->getMedia()->isEmpty()) {
            return asset('assets/back/img/other.png');
        }
        $extension = $this->getExtensionType();
        if ($extension === 'image') {
            return $this->getFileUrl($type);
        } elseif ($extension) {
            return asset('assets/back/img/'.$extension.'.png');
        }

        return asset('assets/back/img/other.png');
    }
public function getImageUrl($type = ''): string
    {
        if ($this->getMedia()->isEmpty()) {
            return asset('assets/back/img/other.png');
        }
        $extension = $this->getExtensionType();
        if ($extension === 'image') {
            return $this->getFileUrl($type);
        } elseif ($extension) {
            return asset('assets/back/img/'.$extension.'.png');
        }

        return asset('assets/back/img/other.png');
    }
public function getImageUrl ( $ type = '' ) : string { if ( $ this -> getMedia ( ) -> isEmpty ( ) ) { return asset ( 'assets/back/img/other.png' ) ; } $ extension = $ this -> getExtensionType ( ) ; if ( $ extension === 'image' ) { return $ this -> getFileUrl ( $ type ) ; } elseif ( $ extension ) { return asset ( 'assets/back/img/' . $ extension . '.png' ) ; } return asset ( 'assets/back/img/other.png' ) ; }
Returns the image url or a fallback specific per filetype.

@param string $type
@return string
Returns the image url or a fallback specific per filetype .