Support image width and height validation
Merge pull request #280 from dreamsxin/image_valid

Support image width and height validation