Added multiple image type support and file load