Added the code for image seclection