Browse Source

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".
pull/438/head
LeoShivas 5 years ago
committed by GitHub
parent
commit
c9c8171a52
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/Providers/AppServiceProvider.php

2
app/Providers/AppServiceProvider.php

@ -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);

Loading…
Cancel
Save