Surprising behavior: This image is too large to display; click here to view

AI-generated summary

A user, mcwumbly, reports a surprising UX behavior: images that appear fine in preview and initially after posting later get replaced with a thumbnail saying “This image is too large to display; click here to view.” The issue stems from Discourse’s server-side image resizing, which can’t be previewed client-side. The image in question was 35MB, exceeding the site’s 4MB limit (mcwumbly). codinghorror confirms the behavior is correct but the UI needs improvement. mcwumbly suggests clarifying the limit in preview and clarifying whether “too large” refers to file size or dimensions. zogstrip explains the two separate settings: one for thumbnails, one to protect mobile users from large downloads. vinothkannans has submitted a PR to improve the UI, adding explanatory text to avoid confusion, as shown in their screenshot.

I find this behavior surprising:

  1. I post a link to an image on it’s own line, like the one below from the article.
  2. It shows up in the preview fine
  3. I create the post
  4. It shows up fine in my post for a while.
  5. Later, it gets replaced with a thumbnail saying: “This image is too large to display; click here to view”

Onebox link:

Preview screenshot:

After post screenshot:

After image is replaced screenshot:

TODO

Looks like the problem isn’t happening here. Maybe it’s a site setting I need to adjust to work around this issue?

https://meta.discourse.org/t/image-too-large-to-link/69954/16?u=trash

What’s the value of max image size kb?

2 Me gusta

Currently it’s 4MB (4096 KB). Looks like that image is 35 MB.

What have others set that to nowadays?

This is in @vinothkannans list of things to improve. The behavior is correct but the UI could use some work.

3 Me gusta

If there were anyway to make it clear this would happen in the preview, that would make it a lot less surprising.

Also, it wasn’t clear to me what “too large” meant, as there are site settings both for file size and for dimensions. I wasn’t sure which setting would need adjusting with the current language.

2 Me gusta

PR created. The new UI won’t create confusions.

4 Me gusta

The issue is that we’re doing some magic :sparkles: server-side to automatically downsize big images which we can’t really do client-side.

I agree. One setting is only used to create thumbnails, the other is to prevent mobile users from wasting their bandwidth downloading a gigabyte GIF.

2 Me gusta

Cool, thanks. What happens in the new UI?

1 me gusta

As you can see it will have some explanation.

5 Me gusta