Since I began using Discourse, the Twitter Card image meta URL has always used relative URLs for topics with uploaded images. I think Facebook can handle relative image URLs, but Twitter does not seem to like them, so no image is displayed in tweets.
I’ve been working around this by using absolute URLs for images in posts, which worked up until last week. Now, even if the post uses the absolute URL, the image’s relative URL is still used in the Twitter Card image meta tag. Like in this topic, for example.
I’ve tried setting
DISCOURSE_CDN_URL, which didn’t seem to affect this tag.
DISCOURSE_RELATIVE_URL_ROOT is set because we’re running in a subdir. If I remember correctly, when I tried changing this is to be an absolute URL, it broke the URL structure for many links.
Any idea how to address this?