Text under topic image instead of file name and size

AI-generated summary

The discussion revolves around displaying a custom text instead of a file name and size overlay on images uploaded to a Discourse site. Krischan initially asked if this is possible and later clarified that he meant a caption, which would be useful for a more journalistic approach to using Discourse.

codinghorror didn’t understand the request initially but later explained that the file name is part of the metadata and suggested renaming the file before uploading it. However, Krischan emphasized that many users might not do this and that captions would be more user-friendly.

A possible workaround was suggested by firascarbonizer, who found a solution by using Markdown to add a title to the image: ![alt text](/src/of/image.jpg "title"). This allows users to add a caption to their images without having to rename the file.

Is it possible to change the file name and size overlay to a free text? Thanks!

What does “change to a free text” mean? I don’t understand.

Change the filename, then re-upload the file. The metadata contains the original filename of the file that was uploaded.

Is it possible to change the File name after uploaded the file? or While uploading the file? Instead of renaming the original file in Device and then uploading it to discourse site?
I see many users in my discourse site also doing same thing and it’s quite hard to explain them. It hugely affects the screen reader as well as the “Alt” for Search engines.

:man_shrugging: if it’s important to the user, you’d think they would upload an image with a proper filename.

2 Likes

Sorry, what I meant is a caption. I assume that many images illustrate the accompanying topic and are not there as a mere “object” that needs to show its metadata. For a new project I would like to use Discourse in a more journalistic way and captions for images would be great in that respect… Maybe there are any workarounds?

This image is named pocket-operator.jpg

This image is named Rod_dice.png

Note the markup

![pocket-operator|690x340](upload://b9VbJFa5XQBkK383Ugc6CQOu2Qu.jpeg)
<img src=".../3X/4/e/4e370d19f62af884c2f12f407910144821309aee_2_690x340.jpeg" alt="pocket-operator" width="690" height="340">

![Rod_dice|476x262](upload://2979eHvlismGQTJcNX5syukGiR2.png)
<img src=".../3X/0/f/0f0c211a87ec72550f991e737ad3d3763e140ad0.png" alt="Rod_dice" width="476" height="262">

As you can plainly see, the filename is in the metadata.

2 Likes

I would need something like this.

Rename the file to that, and upload it.

3 Likes

That might not work if it’s the same file though.

1 Like

Right, the idea is to name the file properly before upload :wink:

1 Like

Can he edit the markdown?

Still, I would assume that the average user prefers a caption - if available - to the file’s metadata.

2 Likes

I was looking for this as well. Seems not resolved here… but found a solution

![alt text](/src/of/image.jpg "title")
5 Likes