validate images on upload