Encountering an issue where media asset paths being saved to database are using back slashes \ instead of forward slashes /
//view
<div style="background-image:url('{{ Voyager::image($page_data->image); }}');"></div>
//browser output
<div style="background-image:url('http://voyager.lar/storage/pages\March2018\j5hUZQly1g9m7x7YM2uT.jpg'); "></div>
Double checked my storage & file system config & all聽seems to set correctly, as the image paths are being rendered, just with the weird slash issue. I was able to fix the paths using str_replace with my controller, but am trying to understand if this is a voyager error or if there's another underlying issue unique to my environment causing this behavior.
pages\March2018\L2GNsd5rkrxFMb4G7Rcx.jpgEnvironment:
Win7 xampp with vhost aliasing enabled.
Voyager::image() helperDIRECTORY_SEPARATOR Fixed in #2837
I am getting this in v1.1.3 but it was working fine before the update
I'm also still having this issue in the current newest version. Every time I upload an image (creating a new record) I get backslashes. using Windows 10.
When using Voyager::image(...) this shouldn't be a problem:
https://github.com/the-control-group/voyager/blob/410a54820a90c881e4a08f7ea49c5f113ee8fdda/src/Voyager.php#L228-L235
Thanks for the tip!
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.