add the support for sparse image