Automatically add a relevant alt image attribute

Hello dears.

When a user upload an image to a new topic/post, the image has the alt attribute as ‘image’ (default for all images).

Like in this example:


Here, to demonstrate my suggestion, i have changed alt name, so when user click it gets a “relevant” information.




Alt text for images is very important for SEO and is a key contributing search engine ranking factor

What happens is, in my webforum, with thousands of posts, almost all image has its alt name as ‘image’.

So, my suggestion:

If alt attribute is deafult (‘image’) change it to a relevant name (for example, and suggestion, the name of the topic + # of post).

1 Like

Nope. Alt is kind of more important to give users a bit better chances when searching images, but filename is the important one, but the most important thing is to use right context, ”this an apple: <image of apple named apple.jpg, alt is apple>.

For SEO of a site alt is totally meaningless.

1 Like

Alt text is very useful for those using screenreaders - including people who are blind or partially sighted. But ideally it is text which describes what is being shown. It’s an accessibility issue. (I can’t think of a simple way to do that annotation - one of the image-oriented software services might do it.)

1 Like

Yes, this has popped up before. To me the accessibility argument is far more important than the SEO one.

When you dump an image in a post and give it no description, blind people reading the forum are at a great disadvantage. They lose extremely important context.

AI can help bit here and provide automatic titles. I would say it performs okish, but has plenty of gaps.

As an opening move I recommend creating a theme component .

force users to provide titles on images

When enabled and you post anything and forget to enter a title for your images we could prompt you with a intermediary bootbox that reminds you to add titles to your images.


AI provided image alt text is on our backlog for the AI team, by the way.


Of course it is. Well, more or less the argument is anything else than SEO.

I have two blind friends. Both are saying same all the time: the issue is not alt itself, but lack of quality alt-text, plus using alt everywhere all the time on images without any content — and here I see really big issues when webmasters get AI that starts generate alt-texts.

And… the main issue for screen readers is bad design of platform, and there the team has done quite good job.

Hey Falco, that’s great news :slight_smile:
Will your work result in a core new feature, or as a plugin?

And most importantly to me: rough planning is availability in 2023 or more 2024?

1 Like

Without coding anything, is there a native way where I can check a box to make image alt text mandatory across my entire Discourse instance?

Hopefully not, because that is something you don’t want to do. You would like to see ALT when an image is important part of content. Mostly images are just… visual noise :stuck_out_tongue_winking_eye: and then no one should use ALT.

This is what happens when all images do not have a name:

Most people are lazy. Unless you pay the moderator to help perform such an operation, most users are too lazy to type helpful alt. There is a high probability that you will get a bunch of images whose alt is 1, aaa, xxx, image1, etc.


13 months later, how’s this coming along? Was wondering if I could add alt text to any images I upload in a post. I use the Landing Pages plugin with the Blog landing page and it seems alt text isn’t being given to the images being grabbed for the blog landing page? (GoNomad | Blog) - Or at least that’s what Lighthouse and performance sites are telling me.

We shipped this feature under the Discourse AI module a few months ago, see