Hi guys,
I am having issues with loading images in my application. I am trying to load a splash/full page image for my application's home page, but can't seem to get it to load. I had it working on my Django app, but now that I have gone back to the XML converted into HTML apps, seems like the image just can't be found.
My picture is present in /opt/splunk/etc/apps/Smartinventoryapp_v2/appserver/static
. Just to be sure it wasn't an issue with the picture, I copied it from the previous working application.
First way I tried was:
<img src="${make_url('/static/app/Smartinventoryapp_v2/test2.png')}" alt="My splash image" />
Second attempt was:
Adding the following code in the html dashboard:
<html>
<dashboard stylesheet="customAppStyles.css">
<h1 id="splashID">
Test
</h1>
</dashboard>
</html>
and created the customAppStyles.css file in the same folder as the picture:
#splashID {
background-image: url(test2.png);
}
As you can see, no picture shows up in either case. In the first case, the placeholder text "My splash image" shows up and in the second case, the Test text shows up. If I remove the text, all I get is a blank line.
Any insight welcome!
Thanks,
j.
Hi,
/opt/splunk/etc/apps/Smartinventoryapp_v2/appserver/static
is the right location.
For the first way ...try using
<img src="{{SPLUNKWEB_URL_PREFIX}}/static/app/Smartinventoryapp_v2/test2.png">
for the image.
Hi,
/opt/splunk/etc/apps/Smartinventoryapp_v2/appserver/static
is the right location.
For the first way ...try using
<img src="{{SPLUNKWEB_URL_PREFIX}}/static/app/Smartinventoryapp_v2/test2.png">
for the image.