Forums

display profile image

Timoa 20 May, 2020
Hello

I have successfully retrieved user profile values from database and displayed it on table. Unfortunately there are only image directory path and not a image itself. I tried to create HTML view but I only see encoded json {"Data":{"field_id":"5","item_id":"527","value":"images\/profile-images\/527-K.-Bull-2010.JPG"}, if I use {var:read_profile}. I don't know how to display or use the values.
How can I display image? What is the easiest way and correct syntax to achieve this.
Tnx
Max_admin 21 May, 2020
how did you display this json string ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Timoa 21 May, 2020
I just used the {var:read_profile} in html and there was coming lots of data, but I don't know how to pick specific value or use it with php.
Otherwise I could make the image visible with the command
echo"<img src='{$image}'>";
healyhatman 21 May, 2020
You can put just the column you want in the "fields to retrieve" section. You also probably want to retrieve first matching.

Then {var:read_data_action_name.model_name.column_name}

If it's in JSON you might need to do {var.jsonde:......}
This topic is locked and no more replies can be posted.