There are some great posts on SO and other SE sites with explanatory images that give a better understanding of the problem or its solution.

Recently I was searching for a particular post I had come across that had an image that easily explained java collections in a simple way.

I found it hard to search for. It would be great if we had a new search operator 'hasImage:1' like the existing 'votes:1' (searches post with minimum number of votes), 'views:1000' (with minimum 1k views), etc.

'hasImage:1' would return posts containing a image, and matching the other search keywords.

How do people feel about this?


It can be simpler, just img:1 or image:1 as proposed by other users.

4 Answers 4


While the advanced search operators are not exactly a paragon of consistency, the most fitting syntax is probably:

hasimage:yes (and the presumably lesser used hasimage:no).

This would be in keeping with boolean search operators like isaccepted: and hasaccepted:.

yes and no should definitely be used as the arguments. Finding posts based on the number of included images is too esoteric and there's already an established boolean format.

image: is a lesser choice because it suggests searching the content of the image as with title: or body:. (Though it'd be awesome if image:"java collections diagram" worked.)

As to the actual need for such an operator, url:"*.png" is a pretty good filter for posts with images, but having to guess at extensions is inelegant. The last thing I would want when searching for posts with images would be to have to redo the search with a number of different image extensions every time I thought of another keyword.


I'm writing here because it's too long for a comment, and I wanted to share some ideas.

I tend to agree but in any case, if this is done, the syntax looks too complicated... It took me a bit to understand you wrote "has image". I thought that capital i was a normal L, as in HASL.

I suggest something simpler like image:1. Let's not make it too complicated by adding verbs, etc.

After all, you type deleted:1and not isDeleted:1.

At first I thought the filter could look for posts that carry some .jpg and .png in the links, but they will be there even if the image is linked and not shown. So either an additional or substitutive filter might be needed. The only thing that comes to my mind and is peculiar to images would be the syntax:

![image description here][#]

If you are OK with an approximate search for posts that contain images, it seems you can search for posts that link to i.stack.imgur.com, the domain used by Stack Exchange for image hosting, by searching for


For links specifically to the image hosting site used by Stack Exchange, or


For links to any image hosted by Imgur, either on https://i.stack.imgur.com/ or its publicly usable image-sharing cousin https://imgur.com/.

These searches will find i.stack.imgur.com or imgur.com images that are embedded via link as well as images that are linked to with no embedding by < 10 rep users (from before the Ask Question Wizard enabled image embedding for everybody). They successfully finds posts with images added via the drag-and-drop/paste tool included with the post editor. However, they won't find posts with external images hosted by non-imgur 3rd party sites to which users manually link.

For instance is:q hascode:no url:"imgur.com" score:..1 closed:no:


Finds, on Stack Overflow, the newest open questions that have no code, link to *.imgur.com, and have a score of 1 or less. Demo here.


This would be great for us visual learners out there, if there's a question out there that has an answer with images in it

I'd prefer to glance over that than read loads of text... it's just easier for some people that way, this would definitely help out with finding such situations

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .