Image multifield not showing on the page | Community
Skip to main content
Level 4
February 21, 2022
Solved

Image multifield not showing on the page

  • February 21, 2022
  • 2 replies
  • 1092 views

Hello , 

I am trying to do nested multifield with Text and Image. I have created the dialog like the below and the values are stored in crxde. And I'm using sling model to display those multifield values on page. Text values are displaying but not the image . Can anyone help me. How to display image into page using Sling model in multifield. 

 

In Crxde the imageReference image url is storing. So I want to write a sling model to retrieve that url and show that corresponding image to my image. But I don't know how to write sling model for image can anyone help me please?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Bhuwan_B
Community Advisor
Bhuwan_BCommunity AdvisorAccepted solution
Community Advisor
February 21, 2022
Mani_kumar_
Community Advisor
Community Advisor
February 21, 2022

1. Check if the image property is injected into your sling model class with same name or not.

2. Make sure you have getter method to read the injected image property in HTL code.

 

If possible please attach the sample code of your sling model to analyse more.

Hope this will be helpful happy coding 🙂

 

Please find the reference link for reading the multifield in AEM

https://levelup.gitconnected.com/aem-how-to-use-nested-multifields-in-your-components-using-a-sling-model-vs-pure-htl-92ff8d036ba1

 

Level 4
February 22, 2022

Hi @mani_kumar_ Thank you. The above issue is resolved. I'm trying one custom component (nested multifield) after I added the image I can't see it's thumbnail in the drag & drop section like the below. Can you guide me, how to create image thumbnail for this ?

 

Here I have selected the image and it got rendered on the page but when I close and open again I can't see the image.