If you upload the image, it will be optimized before the upload happens.
Also, you can see the limit in the browser console
Let’s forget what you see here; it’s misleading with your issues.
From what I tested on your forum, posting an image link works well.
That would be welcome if you could provide another concrete example.
One thing that bothers me is why this image, for example, https://dronescene.co.uk/images/uploads/fullsize/20230227161106_DJI_0087_1.jpg is still failing on your forum (and I can’t reproduce it elsewhere)
From what I see, the cache is only 1h.
# only 1 outgoing preview per user
return render(body: nil, status: :too_many_requests) if Oneboxer.is_previewing?(current_user.id)
user_id = current_user.id
category_id = params[:category_id].to_i
topic_id = params[:topic_id].to_i
invalidate = params[:refresh] == "true"
url = params[:url]
return render(body: nil, status: :not_found) if Oneboxer.recently_failed?(url)
hijack(info: "#{url} topic_id: #{topic_id} user_id: #{user_id}") do
Oneboxer.preview_onebox!(user_id)
preview =
Oneboxer.preview(
url,
invalidate_oneboxes: invalidate,
user_id: user_id,
category_id: category_id,
3 Likes
nbianca
(Bianca)
April 25, 2023, 2:48pm
52
There are two ways images can be oneboxed and unfortunately, only one was handled correctly. This should be fixed in:
main ← fix_image_onebox
merged 05:05PM - 26 Apr 23 UTC
Large or broken images are removed from oneboxes, but sometimes images were remo… ved when they were oneboxed too. The reason is that images can be oneboxed by the AllowlistedGenericOnebox or ImageOnebox and only AllowlistedGenericOnebox was handled correctly.
4 Likes
Richie
(Richie Rich)
April 25, 2023, 6:34pm
53
Thanks for looking in to this Bianca
images can be oneboxed by the AllowlistedGenericOnebox or ImageOnebox and only AllowlistedGenericOnebox was handled correctly
Are you able to tell if this bug was a regression?
1 Like
Canapin
(Coin-coin le Canapin)
April 26, 2023, 12:18pm
54
Hi Richie
Please tell us if this change fixes your issue when it’s live.
2 Likes
Richie
(Richie Rich)
April 26, 2023, 1:32pm
55
I’ve looked at the code changes in the commit from Bianca, looks promising
1 Like
nbianca
(Bianca)
April 26, 2023, 7:48pm
56
The fix has been merged, updating should resolve the issue on your site as well.
I think this has been a bug from day 1.
2 Likes
Canapin
(Coin-coin le Canapin)
May 4, 2023, 8:37pm
58
The fix was merged and this is what will be displayed now when we link a remote image too large to be downloaded to Discourse when download remote images to local is set to true.
3 Likes