XF 2.3 Problems with embedded images

Levina

Well-known member
Licensed customer
I have a small photography forum and members who embed images from external photo hosts like flickr, Postimg or ImgBB are suddenly having problems. Images won't load until minutes later. An add-ons that two add-ons that should kick in upon saving the post don't work properly. And one of my members is getting these warnings when he is trying to hotlink more than one image in a post:

Scherm­afbeelding 2026-09-21 om 04.23.20.webp

I've been testing, created an account at Postimg and ImgBB, uploaded a few images. I copy the BBcode, paste it in a post, save it and the image does appear but the add-ons do indeed not work. One add-on basically converts a hot link into an attachment upon saving the post and the other extracts the EXIF from the file and places it below the image. And these two add-ons now more often than not do not work. However, clicking EDIT and just saving the post again does the trick a few times and the add-ons kick in, but after resaving one or two posts, the trick stops working. But try again a day later and it works for those posts.

flickr too is problematic right now when members want to hotlink what flickr calls the "Original" file size. This is the file size a person has uploaded to flickr, so it could be any size. The BBcode for this Original file size goes through the hotlink process untouched by flickr and all the metadata is embedded. The Large file size can be smaller than the Original but if someone uploaded an image of say 1600px wide, both the Original and the Large file size can be 1600px wide. Problem is that the Large file size is heavily compressed and all metadata stripped in order to make the file as small as flickr can make it.

Copy/pasting the Original file size from flickr is very problematic at the moment. Here too sometimes a resave works once or twice and then it doesn't any more. But come back to the post the next day and do a resave, and the add-ons kick in. However, the relatively small Large version of a flickr image works flawlessly: add-ons kick in on saving the post and all is fine. But as the Large file size is heavily compressed and stripped of all metadata, image quality is compromised and there's no EXIF, which is unacceptable.

I have no idea what is going on because the behaviour I see is so erratic: sometimes the image shows right away, more often it doesn't and you have to wait many minutes. Sometimes the add-ons work, sometimes they don't. Sometimes the workaround of a resave works until it doesn't. But come back to it a day later and it does work.

This has started happening only recently. I have a member who has been embedding images from Postimg for 18 months, without any hiccups. Now his older posts are all empty save for some text, if he included any. You wait for 5, 6 minutes and then the images start popping into the posts. Go back to that page a day later and images are all gone again.

Anybody experiencing similar problems with embeds too?
Anybody have any idea what it can be? What I can do?

@Painbaker
@Naz
 
I have an unrelated but similar problem--our images are stored in R2 buckets and, ever since adding so many rules to Cloudflare, at least one of them is preventing R2 images from loading. Attachments, avatars, etc.
 
I have an unrelated but similar problem--our images are stored in R2 buckets and, ever since adding so many rules to Cloudflare, at least one of them is preventing R2 images from loading. Attachments, avatars, etc.
Interesting. On my site these problems only started recently. Everything worked just fine before, so no idea what's going on.

And what's really weird is how erratic the behaviour is. Like a few days ago I had three images in a post, embedded from ImgBB and they wouldn't convert to an attachment. Tried the day after. Nothing. Waited another day and they were converted just fine. So what changed between not working and then two days later working? I have no idea.
 
The R2 buckets are like Amazon S3, storing the images on another server but pushing them through our XF installation like it's a local filesystem. Since it happens behind the scenes, I'm not understanding why they wouldn't load.

And apparently nobody else does either, as I have mentioned this in a few different places here and haven't had a single reply. I'm getting close to dumping the R2 buckets for that reason, even though it's cheap storage.
 
The R2 buckets are like Amazon S3, storing the images on another server but pushing them through our XF installation like it's a local filesystem. Since it happens behind the scenes, I'm not understanding why they wouldn't load.

And apparently nobody else does either, as I have mentioned this in a few different places here and haven't had a single reply. I'm getting close to dumping the R2 buckets for that reason, even though it's cheap storage.
Yeah, that's frustrating, to have a problem that apparently nobody else has and nobody has an answer to. Although in my case I am seeing other sites also struggling with embedded images. So it's not just my site.
 
As a matter of interest have you checked to see if there's a common browser involved? I've had to resort to using Microsoft Edge to browse Xenforo forums because embedded content seems to cause errors when viewed via Firefox.
 
As a matter of interest have you checked to see if there's a common browser involved? I've had to resort to using Microsoft Edge to browse Xenforo forums because embedded content seems to cause errors when viewed via Firefox.

In my case, users with Chrome or Edge have the same issues. We also have some Safari users, but I don't know if anyone uses Firefox.
It doesn't seem to be browser or device dependent.
 
Anybody have any idea what it can be? What I can do?
  1. Right click the image to open in a new tab. Does it load?
  2. Right click, inspect, Network tab, reload the page, what is the image error?
  3. In inspect Network, click the image, headers.
There is a fault finding process to such things, and really you need to understand the error and then chase it backwards to see where its being blocked.
 
  1. Right click the image to open in a new tab. Does it load?
  2. Right click, inspect, Network tab, reload the page, what is the image error?
  3. In inspect Network, click the image, headers.
There is a fault finding process to such things, and really you need to understand the error and then chase it backwards to see where its being blocked.
First thing I did, Anthony. No errors found anywhere. Which is why I started this thread.

I've contacted the developer of one of the problematic add-ons who is looking into it now.
 
If your server uses rate-limiting for HTTP requests, you may need to tweak the rates and thresholds for image-related requests (such as proxy.php, /attachments, etc). I recently did a calculation for our site that it is theoretically possible for a normal thread-page to trigger close to 2000 requests due to images and embeds (and the ramifications of nested things), even though some of the related XenForo settings have set the maximum allowed to half of the default value.
 
If your server uses rate-limiting for HTTP requests, you may need to tweak the rates and thresholds for image-related requests (such as proxy.php, /attachments, etc). I recently did a calculation for our site that it is theoretically possible for a normal thread-page to trigger close to 2000 requests due to images and embeds (and the ramifications of nested things), even though some of the related XenForo settings have set the maximum allowed to half of the default value.
Wow. Interesting findings.

I did enable rate limiting last week when I had a big wave of bots coming in and noticed how there were two IP addresses involved that were really hammering the site. Rate limiting worked surprisingly well, having the rate limit set to 20 requests in 10 seconds (10 seconds is all I have in the free plan - it's very eh... limited). But once the wave was gone I turned it off again. I don't think it had an effect.

Interesting. I would disable all your CF rules, rate limiting too, and see if embedding returns.
The images get embedded but the add-on that is suppose to add ATTACH tags upon saving the post, doesn't work as it should. The behaviour is very erratic though: it doesn't work, then on resaving a post it does work. Sometimes it works the 5th resaving attempt. Sometimes it works the next day. Sometimes it just never works. And this goes for embeds from flickr, Postimg and ImgBB. All are problematic now.

I've been wondering about Cloudflare too, Anthony. But looking at my settings, I don't see how. I have 4 custom rules and the Browser Integrity Check enabled and those custom rules have nothing to do with images or embeds. It's just really puzzling. I can turn them off but CF would still serve as a proxy so not sure it would make a difference. And like I said earlier, using the inspection tool, checking the network tab, the headers, no errors. It's puzzling.
 
Back
Top Bottom