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

Loading image using expressions

Hi all!

I am attempting to do something similar to (http://community.qlik.com/docs/DOC-4331) - loading an image in Qlik Sense via an expression.

I am unable to load the image as there is no option to choose the representation of the measure. Is there any alternative way to load images with expressions?

Thank you.

18 Replies
Not applicable
Author

Buenas,

Gracias! Perdona por tardar unos meses en responder... La verdad es que, una vez abres Qlik Sense Desktop, si entras en la url http://localhost:4848/workbench/ (desde un navegador de tu PC), ves muchos ejemplos, que además puedes usar de punto de partida (directamente te sale un botón de duplicate).

No recuerdo cual utilicé en concreto, pero supongo que el de tabla, para partir de uno ya hecho.

Not applicable
Author

Hi Fuan,

Thanks! I'm glad you like it. This is a very basic example. The image size can be adjusted by changing the javascript code (on the ImageLoad.js file).

The easiest way to change the image size is changing the height property of the img html element.

Instead of 200px, you could use the desired size. With a little more effort you could evolve this code and add autosizing, scroll bars or any other web page element.

Hope this helps!

jim_chan
Specialist
Specialist

Nice. i have tried and saved! but it didnt reflect on my imageload. is there anything i have missed?? clear cache? if is so, how to clear the cache?

or in short, i have made the changes, and save it, but i still couldnt see those changes on the imageload object.

How can i do it, Jose?

Anonymous
Not applicable
Author

Hi, Jose,

For some reason, my image is  not displayed.  I load the ImagePath like below:

LOAD

     Name,

     Id,

      'http://localhost:4848/content/default/Images/' & Id & '.jpg' as ImagePath

Select ...

And use your way to add the ImagePath as the dimension in the ImageLoad object.

I double checked that the image is added in the path:

C:\Users\<your user name>\Documents\Qlik\Sense\Content\Default\Images


Is there anything wrong?

Thanks very much

Zhihong

Anonymous
Not applicable
Author

Hi, all,

Sorry, I found the reason, I made a mistake of the path.

By default in Qliksense, the images are in folder:

C:\Users\<your user name>\Documents\Qlik\Sense\Content\Default\

No Images folder, after change to:

'http://localhost:4848/content/default/' & Id & '.jpg' as ImagePath

It works perfectly.

Thanks a lot

Zhihong

Anonymous
Not applicable
Author

For my case, the changes works after restart Qlik Sense.

Hope this info helps for others

Zhihong

Not applicable
Author

Hello Jose,

What if I want to read an image from another server ?, or within the same server but without importing the default content ?, simply any folder. The problem is that I have a lot of images and change depending on the selection, and vary greatly in time. If the user has to upload every time you change an image is maintainable recently.

Any ideas?.

Regards,

MAC

Anonymous
Not applicable
Author

Hey!

Great Extension! Is that possible to add 'link to sheet' options?

pentaxadmin
Partner - Creator
Partner - Creator