added a image optimizer interface with a generic implementation