Hi there,
We’re experiencing an issue where relative-linked images, embedded in the fashion of <img src="/link/to/image.jpg" />
from Drupal, are not loading once they are posted as topics within Discourse. I think this is because they are being linked using HTTP from our discourseEmbedUrl variable; but our server delivers all content over HTTPS, which results in a broken image. This is fixed when the link is modified within Developer Tools, for example, to change the link from HTTP to HTTPS.
Tl;dr version: Is it possible to have Discourse use the discourseUrl variable for embedding images, instead of discourseEmbedUrl?
Longer explanation below describes how we arrived at this configuration, and provides more details:
In short, all topics up until our HTTPS switchover were created using HTTP links as the topic source. So when we switched over, we needed the discourseEmbedUrl variable to continue using HTTP links, otherwise duplicate HTTPS articles were created using the new HTTPS topic source URL.
Sorry for the long explanation; is it possible to have embedded images use a different variable than the source URL for cases like this? It seems like we’re currently stuck with two options:
-
Use the same discourseEmbedUrl variable (HTTP) for images as we use for the topic source URL, which results in broken images (as they appear to not be delivered properly over HTTP within embeds)
-
Change the discourseEmbedUrl variable to be HTTPS, and have working images, but also have a duplicate topic created whenever a visitor executes the embed code (as a result of using a different discourseEmbedUrl than its counterpart topic source URL)
I can provide additional information if needed – please let me know!