Fix image logic to allow URL image before gravatar image