SaaS CMS has officially launched! Learn more now.

Fetch image directly from blob instead of from CMS propety



Is it possible to get image directly from blob folder with the image name?

I haven't created any CMS property for the image.


Manjeera T

Mar 02, 2017 12:28

That demands that you know the contentreference to the image

Mar 02, 2017 13:03


When you say blob folder, do you mean the actual folder on disk or in blob storage in Azure? Or are you referring to the folder created inside the CMS? If the latter: Get the reference to the folder, e.g. var folder = new ContentReference(theIdOfTheFolder). Then get all children to the folder with var images = IContentLoader.GetChildren<MediaData>(folder). Lastly loop through all image and find the one with the name you're looking for var image = image.FirstOrDefault(x => x.Name.Equals("theNameYoureLookingFor")) .

Mar 02, 2017 15:03

I would probably ask why you want to get hold of the image directly? Is there something you cannot do with the Episerver API? 

Mar 02, 2017 17:13
* 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.