# 查找所有插入或附加了图片的帖子和回复

**URL:** https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603
**Category:** Support
**Created:** [2018年七月31日 22:31 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603 "2018-07-31T22:31:29Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Jane\_Jojo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jane_jojo/32/119485_2.png) [@Jane\_Jojo](https://meta.discourse.org/u/Jane_Jojo)
#### Post date: [2018年七月31日 22:31 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/1 "2018-07-31T22:31:29Z")

</div>

Related to:

[https://meta.discourse.org/t/don-t-see-uploaded-images-404ing-and-uploads-tar-gz-does-not-show-them/93429](https://meta.discourse.org/t/don-t-see-uploaded-images-404ing-and-uploads-tar-gz-does-not-show-them/93429)

Title says it all: Is it possible to list all posts and responses that have images associated with it?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年七月31日 22:45 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/2 "2018-07-31T22:45:47Z")

</div>

Hmm this is a good point @zogstrip do we have an advanced search operator for “post has at least one image”? That could be quite handy if it’s not nightmarishly difficult to implement.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2018年八月1日 04:13 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/3 "2018-08-01T04:13:24Z")

</div>

I think that now you’d need the [data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin and search raw for upload://

Edit: But I wasn’t even close.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2018年八月1日 04:38 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/4 "2018-08-01T04:38:28Z")

</div>

I think the post\_uploads table carries this relation.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年八月1日 20:27 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/6 "2018-08-01T20:27:41Z")

</div>

> [@codinghorror](#):
>
> do we have an advanced search operator for “post has at least one image”?

Yup, we have “`with:images`” which is generic and “`filetype:jpg`” which looks for a specific upload extension.

---

<div class="post-metadata">

### Author: ![Jane\_Jojo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jane_jojo/32/119485_2.png) [@Jane\_Jojo](https://meta.discourse.org/u/Jane_Jojo)
#### Post date: [2018年八月1日 22:27 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/7 "2018-08-01T22:27:31Z")

</div>

Can I do a OR?

“with:images filetype:jpg OR filetype:jpeg”

> **[Search results for 'with:images filetype:jpg OR filetype:jpeg' - comments](https://comments.alittlebitofspice.com/search?q=with%3Aimages%20filetype%3Ajpg%20OR%20filetype%3Ajpeg)**
>
> Comments for A Little Bit of Spice

---

<div class="post-metadata">

### Author: ![xrav3nz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xrav3nz/32/76894_2.png) [@xrav3nz](https://meta.discourse.org/u/xrav3nz)
#### Post date: [2018年八月1日 22:31 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/8 "2018-08-01T22:31:57Z")

</div>

You can join the file types with a comma to achieve an `OR`, i.e.

```plaintext
with:images filetype:jpg,jpeg

```

> **[Search results for 'with:images filetype:jpg,jpeg' - comments](https://comments.alittlebitofspice.com/search?q=with%3Aimages%20filetype%3Ajpg%2Cjpeg)**
>
> Comments for A Little Bit of Spice

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2018年八月31日 22:32 UTC](https://meta.discourse.org/t/find-all-posts-and-replies-that-have-images-inserted-attached/93603/9 "2018-08-31T22:32:11Z")

</div>

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