add size param, so user can control image size.