On the code below, I am considering taking input only .jpg files. But I want to reformat the code so that it takes input any extension or multiple extension like .png, .JPEG