Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

wangxusq
New Contributor III

Re: How to add the picture in the Mashup

Also tried, still failed.Now See below:

1.png

Can you try it on your QSserver?  Thanks

Highlighted
erik_wetterberg
Honored Contributor

Re: How to add the picture in the Mashup

Hi,

If you reference it with <img src="index.jpg" it should be in the same directory as your html file, the main mashup directory. Make sure you include it in the zip file that you import on the server and it should work fine.

Note that this is the web server path, so there should be no D:, C: etc in the path.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
wangxusq
New Contributor III

Re: How to add the picture in the Mashup

Hi,

Thanks for your response.

Yes, it is in the same directory,the main mashup directory. I copy the picture file into the directory, this true?

Of course ,I also test the path like this:https://XXX/extensions/DemoTest/index.jpg.

But still failed. what's wrong?

Thanks.

erik_wetterberg
Honored Contributor

Re: How to add the picture in the Mashup

Hi,

There are two ways to define the path, relative or absolute. Just giving the filename, "xxxx.jpg" means that it should be in the same directory as the html file where the link is, so a relative path. That's easier in most cases. If you use an absolute path the path depends on if you use a virtual proxy (should be in the path), the name of the qext file (also in the path, after /extensions/).

Have you chacked the browser console for errors? Can you open the image if you just type in the path to the image in the browser??

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
wangxusq
New Contributor III

Re: How to add the picture in the Mashup

Hi,

I used a  relative path and  the picture is  in the same directory as the html file where the link is .

The message is as belows:

1.png

sureshqv
Esteemed Contributor III

Re: How to add the picture in the Mashup

the error says image not found

wangxusq
New Contributor III

Re: How to add the picture in the Mashup

But the path is right.

See they are the same folder :

2.png

erik_wetterberg
Honored Contributor

Re: How to add the picture in the Mashup

And you have put the file 'index.jpg' in the extension zip file and imported it through the QMC? I don't think copying it straight into the directory on disk will work.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
wangxusq
New Contributor III

Re: How to add the picture in the Mashup

So you mean I must export zip file first and then imported the zip  through the QMC?

erik_wetterberg
Honored Contributor

Re: How to add the picture in the Mashup

You might be able to add it through dev-hub but if not adding it to the extension zip file would do it. There is probably also a rest call you could make.

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
Community Browser