Make background image relative

I use Heimdall in a subfolder so that I access to it threw www.mydomain.com/heimdall/.
Custom background image doesn't load because Heimdall generate an absolute link (ie : www.mydomain.com/storage/backgrounds/mycustomimage.jpeg).
The link expected is www.mydomain.com/heimdall/storage/backgrounds/mycustomimage.jpeg.
To fix this, you have to make the path relative by replace in the code "/storage" by "storage" or "./storage".
This commit is contained in:
LeoShivas 2020-02-04 11:41:53 +01:00 committed by GitHub
parent e7a6ac5a75
commit c9c8171a52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ class AppServiceProvider extends ServiceProvider
$alt_bg = '';
if($bg_image = Setting::fetch('background_image')) {
$alt_bg = ' style="background-image: url(/storage/'.$bg_image.')"';
$alt_bg = ' style="background-image: url(storage/'.$bg_image.')"';
}
$lang = Setting::fetch('language');
\App::setLocale($lang);