Reading photo with react from

I’m looking at the demo app from
and login and displaying user’s name works fine. How do I read/display photos I have in my card? In react example code photo is referred as

<Image src=“user.image” defaultSrc=“profile.svg” className=“profile”/>

That doesn’t load photo. Photos are save in profile as vcard:hasPhoto, or as label “has photo”. Using “has photo” didn’t work either.

How did you compose the microquery for hasPhoto? I do not believe ldflex has an alias for hasPhoto directly so I think the query might look something like src=“user.vcard_hasPhoto”.

You can test ldflex microqueries using the playground, which let’s you experiment with ldflex and shows you the underlying sparql as well:

1 Like

Ah, missed that part, so didn’t make any microquery yet…

This works:


1 Like