Image hash code in description of forum topic shared on Facebook/Twitter

Image hash codes are appearing in og:description and twitter:description tags.

<meta property="og:description" content="[58C86A72-CC43-4B36-A8C7-2F360BBA228E]  One Tree Hill, Honor Oak   ๐ŸŽ‰ Welcome to Lewisham  ..." />
<meta name="twitter:description" content="[58C86A72-CC43-4B36-A8C7-2F360BBA228E]  One Tree Hill, Honor Oak   ๐ŸŽ‰ Welcome to Lewisham ..." />

Itโ€™s rare, if ever, that the image caption contains any useful content - most of the time they are lengthy hash codes. If these captions were stripped from the og: tags it would help my social media shares look clearer (I rely on shares to bring people to my forum - theyโ€™re an important part of my branding).

3 ืœื™ื™ืงื™ื

What is the โ€œrawโ€ content of the actual post?

ืœื™ื™ืง 1
![58C86A72-CC43-4B36-A8C7-2F360BBA228E|600x330](upload://5p26A2jfTK4qGLBb0ghom3htfTv.jpeg)
<sub>One Tree Hill, Honor Oak</sub>

## :tada: Welcome to Lewisham

- The highest number of [parks and green spaces](http://www.lewisham.gov.uk/inmyarea/openspaces/Pages/default.aspx) of any London borough. 
- London's largest free fireworks [at Blackheath](http://www.lewisham.gov.uk/inmyarea/events/whats-on/fireworks/Pages/default.aspx) each year.

...

hmmm but why not call the image something sane like: image instead of 58C86A72-CC43-4B36-A8C7-2F360BBA228E ?

when I just pasted an image in I got!

![image|469x439](upload://1f0cKSsDiZiQCRtV1RC08N1OIeA.png)

I uploaded the image on my phone. I wouldnโ€™t expect any member of my forum to a) know how to or b) care enough to edit the following:

![58C86A72-CC43-4B36-A8C7-2F360BBA228E|600x330](upload://5p26A2jfTK4qGLBb0ghom3htfTv.jpeg)

โ€ฆinto

![image](upload://5p26A2jfTK4qGLBb0ghom3htfTv.jpeg)

Whatโ€™s more, I wouldnโ€™t want [image] appearing in my social shares, either. Or anything that appears in square brackets.

Let me upload an image from my phone

Yep I see the guid in there @sam

3 ืœื™ื™ืงื™ื

Well maybe we should improve that specifically for giant guids, add better handling for file names uploaded from mobile

4 ืœื™ื™ืงื™ื

Yes we should handle this guid case for mobile, @gerhard can you add this to your list? I assume all iOS devices will benefit from better behavior here.

ืœื™ื™ืง 1

Should we remove the [image] tags from the excerpt used in og:description and twitter:description or is replacing the GUID in images uploaded from iOS enough?

Showing the alt text of images in those descriptions feels like a bad idea most of the time, but I guess there are some usecases where it makes sense to include them.

ืœื™ื™ืง 1

Iโ€™d like for the [image] tags to be removed from excerpts, yes (others may, of course, disagree)

2 ืœื™ื™ืงื™ื

OK, the first part is now merged: FEATURE: replace GUID in image name uploaded from iOS (#5370) ยท discourse/discourse@41e70c4 ยท GitHub

Iโ€™m waiting on feedback for
https://github.com/discourse/discourse/pull/5377

@codinghorror Do we want to try this out?

7 ืœื™ื™ืงื™ื

Probably fine, go for it and see what people think.

ืœื™ื™ืง 1

@ChrisBeach There shouldnโ€™t be any image tags in the descriptions anymore when you share a topic on Twitter and Facebook. All you need to do is update to latest for this to work.

3 ืœื™ื™ืงื™ื

Many thanks @gerhard. Appreciate the change and the notification.

ืœื™ื™ืง 1

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.