allows only png jpg jpeg and gif file extensions