Closed michaelroper closed 5 years ago
Yeah, I knew normalisePath
might not be the proper function for this case. All I wanted was to ensure the path had the proper slashes. As in, these should all be treated the same:
'iconSetsUrl' => 'icons/'
'iconSetsUrl' => 'icons'
'iconSetsUrl' => '/icons'
'iconSetsUrl' => '/icons/'
I'll see if I can throw together a better function for this.
hah, yeah.. this is surely a problem that has been solved before? 😛
Fixed in 1.0.5
Hey Josh! just a heads up because I just got bit by something similar to #8 ...
Because you are passing the
iconSetsUrl
variable through theFileHelper::normalisePath
function (like here), it actually break the image URL if you seticonSetsUrl
to an actual fully qualified URL, because it converts double slashes to a single slash, breaking anyhttps://...
in the URL.tl;dr:
✅
'iconSetsUrl' => '/icons/'
📛
'iconSetsUrl' => getenv('SITE_URL') . 'icons/'
📛
'iconSetsUrl' => 'https://my.file.cdn.com/icons/'
(URL becomeshttps:/my.file.cdn.com/icons/
)