Can't use img tags

About this bulletin board and the Pale Moon website

Moderators: FranklinDM, Lootyhoof

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 948
Joined: 2019-01-10, 09:37
Location: Slovenia

Can't use img tags

Post by UCyborg » 2026-04-10, 12:18

If I try to add an image like:

Code: Select all

[img]https://i.imgur.com/p10HZnJ.png[/img]
It outputs an error that it can't get the dimensions of the image and that user should check if the URL is correct, which I'm sure it is in this case.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2560
Joined: 2018-05-05, 13:29

Re: Can't use img tags

Post by vannilla » 2026-04-10, 13:40

It seems to be caused by servers putting some kind of protection against "hotlinking" files.
I tried various sites and some work, others don't.
Examples of broken direct embedding: Imgur; my personal GoToSocial instance.
Examples of working direct embedding: the vertical "support us" banner on the Pale Moon homepage; avatars on Codeberg.org.

User avatar
adoxa
Astronaut
Astronaut
Posts: 628
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: Can't use img tags

Post by adoxa » 2026-04-10, 14:28

It seems in Imgur's case if the Accept header contains text/html then that's what you get (redirecting back to its page).

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 948
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Can't use img tags

Post by UCyborg » 2026-04-10, 20:31

Their links do behave strangely as you normally can't open the image directly, but they have the option to generate phpBB code to embed image right in their UI, so it should "just work" on any phpBB forum. :shock: First time I notice this issue.
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.

User avatar
Moonchild
Project founder
Project founder
Posts: 39291
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Can't use img tags

Post by Moonchild » 2026-04-11, 06:34

It's not our problem. It's the issue with pretending to link to an image but actually responding with a document instead. Basically the URL isn't related to the actual image. Server's content-type response headers always trump any "extension" the URL might contain, per spec.
Since there is no actual image on the other end of the line, the forum can't get image data from what is returned, and as a result will refuse to put the content up. An image URL should point to an image, not something else. That's a safety feature of the forum.
"Praise from a narcissistic person is always a poison dart. They don't share the stage, so discernment matters." - Dr. Ramani
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
UCyborg
Keeps coming back
Keeps coming back
Posts: 948
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Can't use img tags

Post by UCyborg » 2026-05-03, 06:21

And somehow your forum is the only one I know that has this "feature".
The Merovingian wrote:Choice is an illusion, created between those with power, and those without.