How to read list of images from a folder

How to read list of images from a folder?


First Read all the image paths into a list, Let’s call it as List A, List A is List Of Strings.

Then Create a List of Images List B, List<System.Drawing.Image>

  1. Then Run foreach for List A
  2. Inside for each use Load Image Activity.
  3. Let us take each value as item in List A.
  4. Then Pass item in the field of path of Load Image Activity.
  5. Then create a image type variable imgC
  6. pass imgC in output Field.
  7. Now use Add to collections Activity and Add imgC to ListB

Now the List B will Contain Images

I have not tested this, But I think it will work.


Im getting errors while trying the same. Can you please share the xaml file?


Path-> string you folder location

string[] filePaths = Directory.GetFiles(path,"*.jpg")



What errors you are getting

Hi, can you share XAML file.

Try this XAML file. Hope it works.:neutral_face:
Read images from folder.xaml (6.7 KB)

Ok, I will try it!

Any idea on getting String, I am getting error…value of 1-d array of string cannot be converted to string

Hi @shreyaank,

String-> strarray


Use (.ToString). It’ll solve your problem.