clarkwinkelmann/flarum-ext-default-image-alt

Sets an alt text to post images when missing

1.0.1 2022-04-14 00:42 UTC

This package is auto-updated.

Last update: 2022-05-14 00:50:28 UTC


README

MIT license Latest Stable Version Total Downloads Donate

This extension sets a default alt text to images that were inserted in a post without any alt text.

It affects all TextFormatter syntaxes that use the internal IMG tag, so ![](https://example.com/image.jpg), [img]https://example.com/image.jpg[/img] and AutoImage.

The main use case of this extension is improving accessibility but help texts are also very useful to see whether the post contains broken images.

The default alt text will not be visible in previews, only in the final output.

The default text is not stored in the post XML, so all existing posts are immediately updated, including when the translation or language is modified.

The alt text is different for posts with a known author. A second alt text is used for posts with deleted author and other contexts where the Flarum formatter is used.

The Linguist extension can be used to change the text.

Installation

composer require clarkwinkelmann/flarum-ext-default-image-alt

Support

This extension is under minimal maintenance.

It was developed for a client and released as open-source for the benefit of the community. I might publish simple bugfixes or compatibility updates for free.

You can contact me to sponsor additional features or updates.

Support is offered on a "best effort" basis through the Flarum community thread.

Links