add some function to support resize image after download and cache them