improved performance for adding an image

Signed-off-by: Gerald <gera2ld@163.com>
improved test page, added support for custom image

Signed-off-by: Gerald <gera2ld@163.com>