Added condition to paperclip dimensions validation.