fix bug in imageoptim task