add image resieze function