Avoid opening the image url if it's not a valid url