optimize image test