added method to change img ext