Page MenuHomeMiraheze

Extension/parser function to resize external images
Closed, DeclinedPublic

Description

Previously I used <img> tag to resize the images. Example: <img src="https://imgbox.com/images/imgbox_large.png" height="200" width="300">

Since it is depreciated in Mediawiki now, we need an extension or parser function to resize external images.

Hundreds of images are broken now. Please consider creating one. Thank you.

Event Timeline

Redmin claimed this task.
Redmin triaged this task as Normal priority.

This should have been broken since last year when the configuration was changed to disallow the img tag, which AFAIK, has been deprecated by upstream. Is there any reason you simply can't use Wikitext?

In T7235#143641, @R4356th wrote:

This should have been broken since last year when the configuration was changed to disallow the img tag, which AFAIK, has been deprecated by upstream. Is there any reason you simply can't use Wikitext?

I'm not aware of the alternatives. I need to use <img> code to resize the displayed images. I believe resize could be done if the image is hosted locally.

How could I resize an external image in wikitext? Thank you.

<img> code has been used in our wiki site. We need to find an alternative to fix all those broken codes.

I understand. The configuration change could be reverted on your wiki for now but that is not a long term solution. How much is the img tag used on your wiki? If a lot, it is possible to provide a parser function for this.

In T7235#144190, @R4356th wrote:

I understand. The configuration change could be reverted on your wiki for now but that is not a long term solution. How much is the img tag used on your wiki? If a lot, it is possible to provide a parser function for this.

Is the change in effect now? The <img> tag is still broken.

Quite a lot. Over hundreds I guess. I believe there is no easy way to replace them after a parser function is available. I have to fix one by one. It will be a nightmare. >__<

Is there any reason why <img> tag has to be disabled?
Currently the website has to be in the whitelist before you can use <img> tag to show those images. It will be safe to use otherwise you won't whitelist it in the first place. <img> tag shouldn't create extra security risks.

Thank you.

It was an upstream desicion to not allow the <img> tag

Unknown Object (User) subscribed.May 10 2021, 06:31

The decision came from upstream mediawiki due to incompatibility with the future mediawiki parser, it had nothing to do with security.

Unknown Object (User) closed this task as Declined.May 12 2021, 19:17
Unknown Object (User) claimed this task.

Unfortunately due to Miraheze will not be enabling the configuration again, due to the upstream decision to remove this, there is not much we can do, if R4356th wants to create an extension for it that's fine but not really a reason to keep this task open if it's blocked on that though. Apologies for the inconvenience this caused.

Revival renamed this task from <img> code no longer works to Extension/parser function to resize external images.May 18 2021, 12:31
Revival reopened this task as Open.
Revival updated the task description. (Show Details)

The task is updated. We request an extension/parser function to resize external images, so we could fix hundreds of broken images. Thank you.

Unknown Object (User) closed this task as Declined.May 20 2021, 11:40
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.

Hello. Unfortunately this is also not necessarily feasible for Miraheze to implement ourself. It would be readding a former core feature through MirahezeMagic, which is something that would be quite difficult to achieve as the original functions from the MediaWiki parser that helped originally make this parser function are also being removed. I do apologise for the inconvenience this undoubtedly will cause, but at this point not much Miraheze can do ourselves. I'm not opposed to eventually making a new extension for this and reviewing it for deployment on Miraheze, but not a Miraheze-made and maintained extension at this point.

Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.May 20 2021, 11:40
Unknown Object (User) moved this task from Backlog to Blocked by upstream on the Configuration board.