load image by user name

load image by user name

  

hello,

i have 4 persons images loaded as a resources and i want to show the right person image by the user authentication username, how i can do that?


thanks.

Hi Shahar.

  1. You can do it by storing them in database and retrieve them based on the user id.
  2. You can include 4 if conditions and write the logic to show the correct image.


Thanks

Ramakrushna Rao Seera

Hello Shahar

Web or mobile?


Eduardo Jauch wrote:

Hello Shahar

Web or mobile?

Web



Hi,

There are different ways to do that.

1. You do like Ramakrushna said. Use one Image widget for each image and IF widgets to select which one to show based in the USer Id.

2. You set the Target Directory of the images and you create a page to downlad them (with a download widget in the end of the preparation), where you select which one to download based on the user id, and use the address of the page in the image widget.

3. Using the Target Directory approach above, you use an expression with an img html tag and a variable to define the address of the file to show

Etc.

Cheers.

Thanks alot, i used the if widget approach, worked great for few images on screen.