I made a custom record page, where I can get detail info about records. This includes the owner field. And next to the field I want to get a photo of the owner and maybe user's photo from "Created By". But I don't know how to do this.

What I have: enter image description here

What I want:

enter image description here

My html form:

    <div class="container slds-card_boundary slds-var-p-around_x-small">   
        <lightning-record-edit-form object-api-name={objectApiName} record-id={recordId}>
            <lightning-layout multiple-rows="true">
                <template for:each={fields} for:item="f">
                    <lightning-layout-item key={f.Id} size="6" class="slds-var-p-around_xxx-small">
                        <lightning-output-field field-name={f.name} class="field"></lightning-output-field>
  • You need to retrieve SmallPhotoUrl field from User object and display it in a <img> tag.
    – pk1772
    Jun 23 at 17:14
  • yeah, I made this. I get only an image. But I need to understand how I can place an image next to his field. It's hard because I have a loop for fields iterating. How I can find this field? Jun 23 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.