* rewrite get image size logics.
 * Check file exists before get it's size.