How to open all the images in a folder

Additional note: point 3 is where the exception shown above is generated.