Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where to put image files for external stylesheet in extension object?

Greetings,

I'm working on an extension object that uses Qva.LoadCSS() to load a stylesheet (style.css) that is resident relative to script.js on the server.  This works fine.

But the stylesheet contains  background-image: url( /some-path/some-image); and I'm having trouble determining what the value of "some-path" should be and therefore where some-image should be placed on the server.

Any help would be appreciated.

-Steve

1 Solution

Accepted Solutions
patrik_seger
Partner - Creator
Partner - Creator

Hi Steve

I usally put my graphics in a subfolder on the web server root and then refer to it in the same way as you would on any other web related content. Eg:

If web server root on the web server is located at C:\intepub\wwwroot, create a subfolder (eg C:\inetpub\wwwroot\images) there.

If you refer to your QlikView AccessPoint as http://servername/qlikview, then you would refer to your images as http://servername/images/image1.jpg.

So that is what I would put in my CSS file (http://servername/images/image1.jpg).

Br Patrik

View solution in original post

2 Replies
patrik_seger
Partner - Creator
Partner - Creator

Hi Steve

I usally put my graphics in a subfolder on the web server root and then refer to it in the same way as you would on any other web related content. Eg:

If web server root on the web server is located at C:\intepub\wwwroot, create a subfolder (eg C:\inetpub\wwwroot\images) there.

If you refer to your QlikView AccessPoint as http://servername/qlikview, then you would refer to your images as http://servername/images/image1.jpg.

So that is what I would put in my CSS file (http://servername/images/image1.jpg).

Br Patrik

Not applicable
Author

Thanks Patrik,

My  lack of css experience lead me to incorrectly believe that the image files had to be specified relative to the stylesheet itself. The idea of an absolute URL never crossed my mind.  My bad. Thanks again.