Imgur images broken

We have an issue that is driving me crazy.

Problem: images hosted at imgur are frequently broken.

Example:

Reloading the page via CTRL-F5 makes the images show up, however, since we are having this issue in many topics, this workaround is not really acceptable.

First observed beginning of September 2019 with images from dslreports.com and FF69.0 (on Windows)
Issue is still present today with FF 76.0.1 and Discourse 2.5.0.beta4

Observations of a different user

  • Confirmation using FF 69.0 on macOS 10.12.6…
    • The normal page load is missing the images as reported.
    • Cmd-Shift-R (reload with Shift key down) causes the images to appear
    • Cmd-R (just normal reload) - no images again.
  • Chrome Version 77.0.3865.75: Same behavior
    • Cmd-R-no images
    • Cmd-Shift-R has images.
  • Safari Version 12.1.2 (12607.3.10) always displays images

Example topics

Any clues what could cause this issue and how it can be resolved?

1 Like

Do the images post ok here? Try the same image link in a reply here.

2 Likes

Good idea!

Imgur

Image link:
Imgur

Direct link:

Markdown link:
Imgur

BBCode

Linked BBcode -> does not work!

1 Like

That’s what I see now (no CTRL-F5 pressed yet):

After CTRL-F5 -> All images visible.

1 Like

Works for me on firefox and chrome, with or without ublock origin activated.

Couldn’t it come from your personnal settings on those browsers (some addons can be very sensitive with out-domain images)

2 Likes

Try in a different web browser, one you don’t normally use. That will rule out any local browser customizations.

If that doesn’t work, try on your cellphone with wifi disabled, which will rule out your local network.

2 Likes

I will collect data also from other users over the weekend and report back.

2 Likes

Sorry, took a little longer to come back to this topic.

Interesting observations of today:

Test-topic: Broken imgur images (for testing only) - Site Feedback and Other Questions - OpenWrt Forum

Firefox

  • Freshly opened FF, not logged in, visiting the test-topic: All images in the first posting are working
  • Freshly opened FF, logged in , visiting the test-topic: Last image in the first posting is not working

Chrome

  • Freshly opened Chrome, not logged in, visiting the test-topic: Last image in the first posting is not working
  • Freshly opened Chrome, logged in, visiting the test-topic: Last image in the first posting is not working

This is repeatable.

EDIT: Above results are for internet access via cable. Just to rule out that it is a connection problem, I crosschecked via mobile phone tethering: same result.

As you can see, for FF it makes a difference if I’m logged in or not; Chrome however doesn’t care, it doesn’t show the last image in any case.

1 Like

Root cause

Linked BBcode -> does not work!
[url=https://imgur.com/6UadCq3]![](upload://oAe4ec2Wl59ohJsE3L6nlRdabPS.jpeg)[/url]

Linked BBcode -> does work!
[url=https://imgur.com/6UadCq3][img]https://i.imgur.com/6UadCq3.jpg[/img][/url]

Is there any reason for imgur to omit the ‘s’ in the image link?

For the ones who can not see this issue:

1 Like

Where did you obtain that BBCode without HTTPS ?

Any way, a couple of tips:

  • Enabling download remote images to local and removing imgur from disabled image download domains settings will ensure this never happens by hosting all images locally.

  • Don’t know who hosts this forum, but it definitely is not following our Discourse official Standard Installation guide. Because of that it doesn’t have HTTP/2 enable so everyone get a slower site.

3 Likes

From the imgur website.

@thess Can you comment on the other two points Rafael mentions?

1 Like

Oh so that is the BBCode generated by imgur when looking into your own image, and using their “Linked Format”.

Well, that is something imgur controls, and nothing we can do about it. Also, we already have workarounds for HTTP content by downloading and serving media locally. Nothing else for us to do.

2 Likes

I would prefer to not host images locally unless absolutely necessary.

The site is hosted by DigitalOcean. I did the installation in 2016 on Debian 8 with what was available then. And… HTTP/2 has AFAIK always been enabled.

1 Like

That is not really necessary. I believe 99% of the people will just just copy and paste images into composer for most of their needs. ++ select area and + into the composer.

Also copying the image from imgur, or the URL of it works just fine. This report is just a minor corner case.

You can also use Replace a string in all posts to correct all old http imgur links.

Discourse is installed in a Docker container, and we ship updates to nginx so you don’t need support on the host OS. Unless you did a custom setup with a manual reverse proxy, your should have HTTP2 out of the box just by having an up to date Discourse.

2 Likes

Not only imgur is affected as I found out.

Also affected (see Broken imgur images (for testing only) - #4 by tmomas - Site Feedback and Other Questions - OpenWrt Forum for screenshots):

  • dropbox (https link, e.g. https://www.dropbox.com/sh/ew0gap0crn30wyk/AACTBNd_oQF4pMzviYqDDtlYa/owrt1907-r11104-e752fc1ff9-20200605?dl=0)

    As normal link here in the Discourse forum: Dropbox

    As onebox

https://www.dropbox.com/sh/ew0gap0crn30wyk/AACTBNd_oQF4pMzviYqDDtlYa/owrt1907-r11104-e752fc1ff9-20200605?dl=0

A screenshot in case you can not see the issue:



Link not found is contrary to what I see in the OpenWrt forum when I press CTRL-F5 (image link IS working then, and not “not found”)

Fixing this issue for imgur seems rather simple, although with some effort involved, and that effort has to be made regularly, as new non-working links come in.

@Falco Since the dropbox link doesn’t seem to work in the discourse forum too: Do you host images locally as advised above?

1 Like

One more example for a non-imgur site that does not work with oneboxing:

https://www.kuketz-blog.de/openwrt-update-benachrichtigung-fuer-packages/

1 Like

Yes, we download images locally, which is the default Discourse behavior.

Posting links from third parties will eventually devolve into broken images, and that is why Discourse comes with this feature built-in from the early days. Of course there is a trade-off, you have to provide space for the images, either locally or using a Object Storage service.

2 Likes

Sorry for being so persistent, but I’m confused and I think I havn’t understood the problem correctly.

What confuses me:

While creating this posting and adding a link to

https://www.kuketz-blog.de/openwrt-update-benachrichtigung-fuer-packages/

I see a broken image in the preview area:


— start screenshot —
grafik
— end screenshot —


However, at time of writing this posting, in my previous posting I see the same link with correct image displayed:


— start screenshot —


— end screenshot —


I don’t understand why I’m seeing this issue in the discourse forum, although images are stored locally as you say.

1 Like

That means you have installed broken browser extensions. Can you remove all extensions and try again?

2 Likes