Try our conversational search powered by Generative AI!

How to make Image Picker display currently chosen image on click

Vote:
 

Episerver CMS version: 11.20.3.0

Hi.

I'm currently on a project where we have a page type called ArticlePage for our customer to publish articles.

In this pagetype we have a property called MainImage (Hovedbilde) to add an image to an article. It's defined in code like this:

[Display(
           GroupName = Global.PropertyGroups.Content,
           Order = 40)]
[AllowedTypes(typeof(ImageFile))]
[UIHint(UIHint.Image)]
public virtual ContentReference MainImage { get; set; }

---

Now, let's say we already have created a page of type ArticlePage and uploaded an image to the property MainImage like this:

---

---

When the currently chosen image is clicked on, the image picker window shows up like this:

---

So what our customer wants is to make this image to automatically be displayed in the top of this image picker, so they don't manually have to search for it.

Right now it just displays random images. They have a lot of images, and it's therefore difficult to manually navigate to them.

How can this be done?

#255586
May 26, 2021 11:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.