Oneboxing large images fails with no visual cue

i’m wondering if the download_remote_images_to_local setting might be worth testing here

edit: nope, i just tried and that didn’t affect the issue.

1 Like

Yes, my bad! :smile: The link will eventually be replaced by the uploaded version in the post. It just takes time and I overlooked that. (I expected the original link to be kept in the raw content)

That’s the expected behavior. If an image is too large, it’s removed.

It’s less expected that we don’t have a warning when you first post the link in the composer.
Seeing the image disappears suddenly is confusing, for sure.

1 Like

i thought the expected behavior for external linked images was for it to shrink it to fit and make it linked to the original? that is exactly what it is doing in my pm views.

1 Like

The previous behavior always displayed a placeholder with text saying the image was too large.
Now, because the onebox contains a link, it’s always removed.

Related to:

2 Likes

Good catch.

I reverted this change on my local install and here’s the result, which is what we expect:

4 Likes

@Arkshine that may be the case, but the issue being discussed here is that the image doesn’t display - when it should display.

The images we are all testing with are not dead images, so they should display.

They have always displayed, regardless of the size, for years and years (and years).

And now, in the last eight weeks, they don’t display anymore.

2 Likes

Can you check in your staff action logs if the download remote images to local setting was changed?
Just append this to your site URL: /admin/logs/staff_action_logs?filters=%7B%22action_name%22%3A%22change_site_setting%22%2C%22action_id%22%3A3%2C%22subject%22%3A%22download_remote_images_to_local%22%7D

From what I understand, when hotlinking an external large image,

  • Old code displayed the “image larger than X MB” prepended with the image link

  • New code completely removes the image (which seems wrong)

However, I am only able to have a displayed large external image in my post if I disable download remote images to local:

1 Like

You’re right; we strayed away from the initial issue. the problem I described concerns why the [too-large] images disappear (which is a valid point and a separate issue :smile:)

It doesn’t seem to be your situation.

I can reproduce the failing onebox request failing and return 404 on your forum.
It’s unclear why some of your URLs (of the same domain) in the first post fail.
It might be a host issue at some point, and the status got cached (should be 1h).

I tried to post other large images (> 20Mb) on your forum – it works well (lightbox works too)

60 MB here:

So far, considering others’ images work, it sounds like dronescene.co.uk had temporary issues. :thinking:

1 Like

ok yes i too have now verified that the issue is the images from that drone site. i have successfully loaded a number of externally linked high res nasa images without issue into a test topic post and they show up fine with links to the originals.

Confirmed no change for many years:

It’s bizarre, isn’t it?

Some images seem to work, others don’t :person_shrugging:

Because an image linked from Wikimedia.org doesn’t work anymore either, as @Canapin demonstrated:

I’ve been trying to see if there was a pattern to this.

Maybe PNGs or JPG vs JPEG or something, but I can’t see why some images work and other images don’t :exploding_head:

I think this would only apply if, and only if, the image was bigger than your Discourse settings allowed.

We can upload 100mb images to our Discourse, which is why this has never been a problem for us (until recently).

And which is probably why Arkshine can upload a 60mb image ok too.

But the image from Wikimedia.org that Canadian shared, doesn’t work either :thinking:

It’s very puzzling :slight_smile:

3 Likes

i have loaded both high res png and jpg from nasa

1 Like

Yeah, exactly :rofl:

I have no idea what’s going on :blush:

Here’s a 6mb image from another domain name, that doesn’t work here either:

https://wallup.net/wp-content/uploads/2019/05/10/838083-autumn-fall-landscape-nature-tree-forest-leaf-leaves-path-trail-bench.jpg

And a 4mb image, from another different domain name, that also won’t work here:

https://www.wallpaperflare.com/static/364/459/767/plateau-landscape-photography-green-trees-wallpaper.jpg

I’ll leave it there for now, there are probably many more domain name examples, hopefully the dev team have enough examples and information to go on :blush:

Have a nice weekend everyone, thanks again for all the help and input :smiley:


Just to confirm, the image still appears in the composer, but vanishes from the baked post:

It’s a separate issue, and it doesn’t happen for you.
It works as expected in your forum:

It works on your forum :

But it doesn’t work here on meta, nor does it work on try.discourse.org

It’s bizarre :smiley:


Hopefully the developers will work out what the issue is, thanks again @Arkshine :smiley:

It’s a different issue. The limit here is 4MB, and since the file is too big, it’s removed (usually, you would see a message).

That’s not what’s happening with your forum.

This is a 6.7mb direct upload to meta:

And this is a 4.8mb direct upload:

I don’t think there is a 4mb limit here :thinking:

But now I really must head off, thanks again @Arkshine mate :smiley:

1 Like