added dataURL support for `@icon`

Signed-off-by: Gerald <gera2ld@163.com>
improved wrapper, to avoid some unexpected exceptions

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