fix image optimzation