support single and multi image modes