add size param to control image size.