# Set featured image without posting it in the topic

**URL:** https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232
**Category:** Support
**Created:** [August 4, 2025, 3:19pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232 "2025-08-04T15:19:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 4, 2025, 3:19pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/1 "2025-08-04T15:19:01Z")

</div>

I’m aware of the components to set a featured image by picking one of the images in the topic, but is there any other option similar to Wordpress where we can upload an image as featured without it being in the topic itself? I pretty much would like to use it as the open graph image, but not necessarily include it in the post, because an open graph image can include info to attract potential readers, but in the topic itself it wouldn’t make sense.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 4, 2025, 3:28pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/2 "2025-08-04T15:28:50Z")

</div>

I take a shortcut. I’m using a whisper to publish an image, and then Topic List Previews component to choose it.

But sure. That solution isn’t exacly what you are looking for. But close 😂

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 4, 2025, 3:55pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/3 "2025-08-04T15:55:26Z")

</div>

I think hiding the image from the post is currently the best available option

> [@Topic List Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails/150602/171):
>
> Maybe you could use [Generic bbcode wrapper for theme components](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516) to do something like [wrap=hidden] ![image|612x500|hide](upload://cILOby5v31IEtJtbOEEDgXQPZ7Z.jpeg) [/wrap] Then some CSS like div[data-wrap="hidden"]{ display: none; }

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 4, 2025, 4:48pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/4 "2025-08-04T16:48:47Z")

</div>

That is nice way to do it, I adopted it. And potentially dangerous too, because it can hide what ever.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 10:56am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/5 "2025-08-05T10:56:50Z")

</div>

How about naming the image a certain way all the time, for example starting with “hidden-image-” and use CSS to hide all images that start like that?

That seems to be possible:

> <https://stackoverflow.com/questions/35601204/how-to-use-css-html-to-hide-image-with-src-like-1-jpg-or-1-gif>

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 10:57am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/6 "2025-08-05T10:57:49Z")

</div>

What is a “whisper” in this context?

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 10:59am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/7 "2025-08-05T10:59:01Z")

</div>

Can we change the “wrap” from “hidden” to something more custom that would avoid any danger that @Jagster is thinking about?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 5, 2025, 10:59am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/8 "2025-08-05T10:59:34Z")

</div>

See [Creating a whisper post](https://meta.discourse.org/t/creating-a-whisper-post/44247)

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 11:02am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/9 "2025-08-05T11:02:26Z")

</div>

I’m also thinking: if the image is hidden, would open graph still be able to “see” the image to use it?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 5, 2025, 11:18am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/10 "2025-08-05T11:18:22Z")

</div>

The image is only hidden from being shown. It’s still there, just not visible when you look at the topic.

You can make the CSS more specific so it hides not everything, but for example only images or even only images that are specified as a thumbnail.

My example:

The post:

```plaintext
testing

[wrap=hidden-img]
![grün|500x500|thumbnail](upload://wDxG1UR10Uj4bCO9l3pUbJvBAW5.png)
[/wrap]

```

The CSS:

```css
div[data-wrap="hidden-img"] img[data-thumbnail="true"] {
  display: none;
}

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/3/f/33fe243d3c7ef9e9ca23511ba0b7a6028dfea7bc.png)

Then you need to use the wrapper, you need to put an image in it and you need to add `|thumbnail` for it to hide.

Without `[data-thumbnail="true"]` all images in the wrapper would be hidden. But that’s still less than “everything”.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [August 5, 2025, 11:41am UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/11 "2025-08-05T11:41:46Z")

</div>

The threat scenario here is, or is for me, that someone hides something that googlebot hates. It would be an easy way to sabotage SEO etc.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 5, 2025, 12:23pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/12 "2025-08-05T12:23:35Z")

</div>

You can also hide stuff in posts with other techniques

Like `<!--HTML comments -->`  
There is one below:

So I don’t think the wrap syntax is a problem

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:24pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/13 "2025-08-05T12:24:11Z")

</div>

This particular thing is just for me to use on specific categories. It’s not something I’m allowing other users to do.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:25pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/14 "2025-08-05T12:25:22Z")

</div>

But this would be seen as a comment, not an image, right? When it comes to the open graph.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:26pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/15 "2025-08-05T12:26:51Z")

</div>

So basically the wrap data can pretty much be anything I want?  
This seems like a good option.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:28pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/16 "2025-08-05T12:28:43Z")

</div>

How about my suggestion to name images a certain way?

> [@Set featured image without posting it in the topic](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/5):
>
> How about naming the image a certain way all the time, for example starting with “hidden-image-” and use CSS to hide all images that start like that? That seems to be possible:

That would avoid extra steps, extra code, etc.  
A single component with the CSS and just reminding myself to name images a particular way.

* * *

EDIT: never mind. I noticed that files are renamed with some random numbers and letters, so this wouldn’t work.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 5, 2025, 12:30pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/17 "2025-08-05T12:30:09Z")

</div>

It was just an example that hiding stuff in posts is possible. So bad actors will also find other ways to add stuff.

> [@alltiagocom](#):
>
> So basically the wrap data can pretty much be anything I want?

It only adds something you can use in css to customize it. In my example it adds `hidden-img` and then I can use that to hide the image.

> [@alltiagocom](#):
>
> I noticed that files are renamed with some random numbers and letters, so this wouldn’t work.

I think it can work. When you have `![IWantToHideThis|500x500|thumbnail](upload://wDxG1UR10Uj4bCO9l3pUbJvBAW5.png)` you can use something like

```css
.cooked img[alt="IWantToHideThis"] {
  display: none;
}

```

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:34pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/18 "2025-08-05T12:34:22Z")

</div>

> [@Moin](#):
>
> It only adds something you can use in css to customize it. In my example it adds `hidden-img` and then I can use that to hide the image.

Yes, and what I mean is that `hidden-img` is not like a “fixed” thing? If I wanted to use `abc-airplane`, as long as I use the same in the CSS, that would work as well?

> [@Moin](#):
>
> It was just an example that hiding stuff in posts is possible.

But for this particular case, it’s not an option, because open graph will not see that as an image, but as a comment, correct?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 5, 2025, 12:36pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/19 "2025-08-05T12:36:01Z")

</div>

> [@alltiagocom](#):
>
> If I wanted to use `abc-airplane`, as long as I use the same in the CSS, that would work as well?

Yes, you can use whatever keyword you want.

> [@alltiagocom](#):
>
> But for this particular case, it’s not an option, because open graph will not see that as an image, but as a comment, correct?

I think so, but I am not sure.

---

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [August 5, 2025, 12:37pm UTC](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232/20 "2025-08-05T12:37:31Z")

</div>

> [@Moin](#):
>
> I think it can work. When you have `![IWantToHideThis|500x500|thumbnail](upload://wDxG1UR10Uj4bCO9l3pUbJvBAW5.png)` you can use something like

I was referring to my solution of naming my files a certain way before uploading, like:  
`hide-this-image-vacations-2025.jpg`  
and then the CSS would hide all images that start with `hide-this-image-`, but when I upload an image, it doesn’t keep the name `hide-this-image-vacations-2025.jpg`. It will convert it to something like `wDxG1UR10Uj4bCO9l3pUbJvBAW5.png`

[Next page](https://meta.discourse.org/t/set-featured-image-without-posting-it-in-the-topic/377232.md?page=2)
