Images URLs are broken (https: part not being included)

Hello, for some reason my post attachment image urls are not being returned correctly, the “http:” is not included so the image_url field instead of returning:


it returns:


It happened overnight and I have no idea why, I haven’t changed anything on my server config for a long time.

Any ideas, this is killing me =(

Thank you

1 Like

How did you install Discourse?

Are those images no longer displaying?

1 Like

I installed discourse in a ubuntu server digital ocean droplet like 1 years ago. It’s been flawless until today which I found this error. I discovered that enabling “enforce https” solves the problem but why didn’t I need it until today? I’m not sure.

1 Like

If the URL format changed without you doing anything, my assumption would be that your server automatically updates Discourse and this was the trigger but I wouldn’t expect the URL comparison you used to be a problem. Unless you’re displaying that URL to users for them to be able to copy, it should work as-is.

A URL beginning “//” uses the same scheme as the document referencing it, i.e. if you successfully visit the page over HTTP, it’s equivalent to “http://”. If you visit the page over HTTPS, it’s equivalent to “https://”

1 Like

Mixed content warnings. Modern browsers are blocking HTTP (insecure) content from loading over HTTPS (secure) connections.

When you have “Force HTTPS” enabled, every URL that Discourse loads will be secure.