23

I very often want to re-use images I previously posted to a particular stack.

This is a {how-to-question | feature-request} to let me efficiently browse the images I have posted in the past to a particular stack.

Bonus points for a method to filter based on a word or words in the question or my answer -- e.g. all images I used where the question or my answer contains the word "3-way" in diy.stackexchange.com.

"The pictures I posted to all stacks" may be too broad, so being able to filter by stack would be helpful.

Right now I use Google image search, however this has an extremely poor "hit rate", and Image search does not allow filtering by site (even if it did, the images are not at stackhere.stackexchange.com, they are at stack.imgur.com).

Is there a way I can do this?

1
  • This might not help for old images (unless you edit the post) but if you use the alt/title text for the image to describe the image does that give a better hit rate?
    – ChrisF Mod
    Commented Apr 20, 2019 at 20:36

2 Answers 2

26

Assuming the images are hosted on Imgur, you can just search for user:me url:imgur. Add keywords or search operators like normal to refine the search.

0
16

Use the Data Explorer, for example with this query

select 
    p.id [Post Link]
   -- , body
   , score
   , p.creationdate
from posts p
inner join users u on u.id = p.owneruserid
where u.accountid = ##accoutid:int?7546260##
and body like '%<img src="https%'
and body like '%##term?3-way##%'

This will return today:

enter image description here

Keep in mind SEDE is updated once a week, on Sunday.

3
  • Where does the accountId of 7546260 come from? How would I work out my accountId? Commented Apr 23, 2019 at 10:48
  • @JamesWhiteley it is your network profile account id: stackexchange.com/users/11219166/james-whiteley it can be reached from your user profile on any site and then click the link Network Profile found at the top right of that page
    – rene
    Commented Apr 23, 2019 at 10:49
  • 2
    @JamesWhiteley yeah, if you want to run this on SO only userid would have worked (the posts table has an owneruserid column, so that is one join less) but the OP mentioned they planned to use this on other sites as well in which case accountid is easier as that one is stable across all sites, whereas userid isn't.
    – rene
    Commented Apr 23, 2019 at 10:57

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