added image optimizer, fixed transformation options for external images