1

I'm looking for somewhere or someway to get icons like this:

Stack Overflow Icon

I found the sprites, but it isn't exactly what I want.

P. S: I need the icons with transparent background

1
  • 1
    Have you tried looking at the question page for each site and parsing out the link rel="shortcut icon" ... header? Oct 5, 2023 at 16:53

4 Answers 4

2

The site data.stackexchange.com provides a list of all sites on the network, including their icons. These are all .PNGs, with transparent backgrounds, and all are called apple-touch-icon.png.

You can easily and quickly download all of these using a browser plug-in like 'Download All Images' (for Firefox or Chrome).

They all have a resolution of 158 x 158 pixels, though, of which a large part is empty.

4

Don't know if there's a proper way, but let's use JavaScript and wget.

  1. Go to here (https://stackexchange.com/sites)
  2. Open the JavaScript console (in dev tools), and run this. It selects all site icons, extracts the links using .map(...), and then prints it with console.log.
    console.log(Array.from(document.querySelectorAll("img.site-icon")).map((x) => x.src).join("\n"));
    
  3. Copy the output into a file
  4. Now, use your favorite tool to download any of those that you want. If you need them all, you can download them all with wget, although I haven't checked if SE permits that. I'd highly suggest waiting a few seconds between requests to be nice. See here, for example.
1
  • It works, but I need the images without background. Oct 5, 2023 at 1:39
4

The following option is more flexible than using JavaScript and wget (as mentioned in this answer), but seems to omit many of the icons:

  1. Go to the Stacks Design logo page
  2. Download any icons you want - it includes SVGs, PNGs, and PDFs

It seems this only includes the following:

  • Stack Overflow Teams a.k.a. SOfT
  • Collectives on Stack Overflowtm
  • Stack Overflow Talent
  • Stack Overflow Advertising
  • (Logos for international SO sites)
  • Server Fault
  • Super User (Stack Exchange site)
  • Meta Stack Overflow a.k.a. MSO
  • Stack Exchange a.k.a. SE

I don't know why those were picked, but if you need some product-specific ones, that might be a better option. It's certainly more official. See also this feature request.

1

Use the API

There's an API endpoint /sites. Let's use it! Unlike the other scripted option, this gives access to high-resolution icons. I don't want to deal with paging, so we'll set pagesize to a big number.

Here's a JS snippet for it (assuming you have jQuery, because jQuery).

$.getJSON('https://api.stackexchange.com/2.3/sites?pagesize=999', (data) => {
  console.log(data["items"].map((e) => e.high_resolution_icon_url));
});

Or, to get them all separated by newlines, you could do this:

$.getJSON('https://api.stackexchange.com/2.3/sites?pagesize=999', (data) => {
  let icons = data["items"].map((e) => e.high_resolution_icon_url).join("\n")
  console.log(icons);
});

You could also replace high_resolution_icon_url with either favicon_url or icon_url, depending on exactly what you'd like.

2
  • 3
    Please include all the ways in one answer, it's not a poll or discussion asking for opinions, so better have all possible info in one place. (e.g. you can have the answer say "here are several ways to achieve that...") Oct 5, 2023 at 8:27
  • 2
    @ShadowTheGPTWizard I disagree. The SE network often emphasizes that multiple answers (from the same author) are completely fine (and even preferred) when they offer independent solutions (see this post, for example). The only small 'problem' I see here is that the answerer refers to the fact they offer multiple answers, which is unnecessary and noisy, as it doesn't help frame the answer.
    – Joachim
    Oct 6, 2023 at 13:45

You must log in to answer this question.

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