Raise errors on invalid image URL