Topics that are only images have [image] as the meta description

I’ve got this meta tag with a few [image] found in it and nothing more - it’s really useless:

Google Webmaster tool isn’t happy about it either:

3 Likes

Agreed, if the post is nothing but images and has no text content IMHO the meta description tag should either be not used or have an empty content attribute value

2 Likes

I wonder about this, I have seen [image] as well, we should verify that the alt image text is used in the post excerpt extractor when possible (when it is specified). For example in a typical image upload…

simmons

Can you take this as a to-do @techAPJ, let’s verify the behavior is correct. The rendered HTML above is

<img src="https://img.gif" alt="simmons" width="198" height="300">

2 Likes

Verified that alt image text is used in post excerpt as per:

https://github.com/discourse/discourse/blob/acd1693dac1bff6ff50250d942134bc48a27ff14/lib/excerpt_parser.rb#L78

The post just above as seen on your activity page:

Also, based on my local testing I noticed that in some cases we were showing blank meta description. Fixed that issue via:

https://github.com/discourse/discourse/commit/42c405a8200f9e481bcd64a18beabed9a8dea8d4

3 Likes