I've noticed that some URLs, serving dynamic images, but without an extension or GET parameters, don't seem to be liked very much by the bbcode parser (?) here, for instance:
[img]https://my.calcs.quest/userbar/1[/img]
However, if we add "?style=light" at the end, it does work...
In both cases, the response header seems to be correct, and at the very least serves a "content-type: image/png" or similar, so I guess this isn't the cause.
The bbcode parser assumes that image URLs end in one of .jpeg, .jpg,, .gif, .png or .svg, or that there be a non-empty query string in the URL (?foo).
Alright. Is that something that could be changed? Because I'm pretty sure this is the only forum where a I've seen this so far.
I guess users could just append ?foo, or almost anything really, but it's annoying that they'd have to do that.
I don't really want to force a .png by default either in the embed code pages of the mycalcs userbar thing (since that's where I first noticed the issue) because the backend serves WebP if the client tells it supports it, and PNG otherwise.
Having a ?foo appended by default is also rather ugly, and might mess with caching according to some people (but I've yet to check that)
Any other idea?
It's
a phpBB 2.x thing. There doesn't seem to be any reason to do that, so I've dropped those requirements.
In the past I have resisted this change, on the theory that dynamic images in posts that could change their content after posting are not the most friendly UX. Of course, it's trivial to hide a dynamic image behind a URL that matches our previous filter, so swings and roundabouts, I suppose.
It does look fixed now indeed, thanks 🙂
@KermM yeah that's a fair point - I guess such abuse would have to be dealt with at the user-level anyway, since 99% of the usage is likely non-problematic.
As per TIny_Hacker's report, adding GET parameters makes it fail.
Is it possible to support that?
For instance:
[img]https://my.calcs.quest/userbar/1?style=dark[/img]