Realized the error of my ways and reverted the url get.
Don't check url content-type if link is self.post. Added xdg-open as temporary fallback if url is not an image.