Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Is there a way to get the icon or the IconUrl of the site so I can put it in my app like the DisplayName?

share|improve this question
    
stackapps.com/questions/95/… –  Joel Potter Jun 2 '10 at 15:26
    
Also this: stackapps.com/questions/405/… –  TheHurt Jun 2 '10 at 18:48
1  
DAMN YOU EDIT TIMER! Both Joel's link and mine only cover fair use of the site logos. Robert say's we can use the logos in certain ways. It would be nice for SO to provide an API call that would provide graphics that are open to everyone to use perhaps in various sizes, or in scalable formats. This will be a bigger issue when the SE sites go live. –  TheHurt Jun 2 '10 at 18:55
3  
I like the idea of an authorized set of official graphics with unrestricted (or nearly so) use. –  Dennis Williamson Jun 3 '10 at 0:11
    
I'll point you here for some legal guidance. Additionally, some sort of site logo/icon discovery is [status-planned]. –  Kevin Montrose Jun 13 '10 at 16:35
    
Implementation suggestion: include a "logo" element in the /stats API route (it makes sense to go along with "display_name"). –  Felix Jun 13 '10 at 16:50

3 Answers 3

up vote 3 down vote accepted

The http://stackauth.com/sites method returns a list of all sites in the network, and /stats returns a site object with logo & icon information (plus more).

share|improve this answer

Yes. Thanks to George's hard work, there is a quality set of Stack Exchange brand images. I have hosted them and included the path in SOAPI-MAP.

As other SE sites get folded in, I will add them to the map along with any graphics made available.

share|improve this answer
    
Hooray! My icons found a home. Are you hosting the SVG files? –  Nathan Osman Jun 13 '10 at 13:52
    
Never mind. I see the icon size parameter. –  Nathan Osman Jun 13 '10 at 13:54
    
@george - the svg icons are there but 1) the naming format breaks the path format and 2) are not typically what would be consumed by an app. If you want SVG, as you probably discovered, images/so-icons/svg/xxx.svg will get them for you. –  Sky Sanders Jun 13 '10 at 19:46
    
Oh, feel free to rename them - I'm planning to add more sizes/formats later. –  Nathan Osman Jun 13 '10 at 19:54
    
And ya, I didn't think there was much use for the SVG files when it comes to web applications. –  Nathan Osman Jun 13 '10 at 19:55

The methods stated in the comments are great for pre-defined sites, but in the future there will be new sites that people may want to add to your application immediately (if you have the facility for user-defined sites).

What I did in my app is inspect the index page of the site and scour it for logos (like a favicon, or iPad icon). It works OK, but an official mechanism for this would be better (somewhere in the /stats/ page perhaps)?

A policy about the use of said icon would also help, stating that you have to write it to your own hosting rather than hotlinking, etc.

(I'm posting this an an answer so that it will bump the question and hopefully get it some attention from the powers-that-be).

share|improve this answer
    
Great idea. In the meantime, feel free to hotlink my icons: stackapps.com/questions/347 –  Nathan Osman Jun 12 '10 at 23:23
    
@George, already using them :) –  Mark Henderson Jun 13 '10 at 1:38
    
@George - stackapps.com/questions/684/… –  Sky Sanders Jun 13 '10 at 6:42

You must log in to answer this question.

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