Jump to content


 

Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How To Make A Favicon For Your Web Site


  • Please log in to reply
26 replies to this topic

#1 Grinler

Grinler

    Bleep Bleep!

  • Admin
  • PipPipPipPipPipPip
  • 38,392 posts
  • Gender:Male
  • Location:USA

Posted 19 June 2006 - 01:32 PM

How to create a Favicon.ico for your web site


Ever wondered how web sites have those cute little icons in the address bar of a web browser? For example, here at BC we have a little computer next to the address of any page you go to at this site.

Well now you to can have one of these icons for your own site. The instructions provided below using a freeware graphics program called Paint.NET. You can, though, use any program that allows you to create specific image sizes and save them as a PNG file.

Nuff of the intro...let's start making a favicon:
  • Download Paint.NET and install it on your computer. Please note that this program needs the Microsoft .NET framework installed.

  • Start Paint.NET

  • Click on the File menu option and then New.

  • Change the Width and Height to 16.

  • As the image is now way too small to work with, lets zoom in on it so we have more room to work with. To do this click on the dropdown menu, found on the main menu bar, that has a bunch of percentages in it and select 3200%.

  • Now using the program, create the icon you would like to use with a maximum of 16 colors. As I have as much artistic ability as a rock, I can't help you with this. An example of a really bad icon is a stick figure I just made: Posted Image

  • When done, save this image as a PNG file called Favicon.png and exit the program.

  • Now download png2ico and extract it to your hard drive. This program will be used to convert your PNG image to a .ICO file.

  • As png2ico is a console program you need to run it from a command prompt. Start a command prompt and navigate to the folder you extracted the program to. Once there you would use the following command to convert your PNG file to a ICO file. These commands assume your PNG file is saved in the C:\ folder.

    png2ico favicon.ico --colors 16 C:\Favicon.png (Note there are two dashes before color)

  • Once the Favicon.ico is made, upload it to the root of your web site.
Now when someone visits your site they will see your icon next to the address.

If you would like to put the icon in a folder other than the root one, you can use the following html in your <head></head> section of the document.


<link rel="icon" href="http://example.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/x-icon" />


For example:
<head>
<title>This is a test</title>
<link rel="icon" href="http://example.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/x-icon" />
</head>

Edited by Andrew, 06 April 2010 - 04:29 PM.
Corrected Minor Error In Command Line -AA


 

  • BC Ads
  • BleepingComputer.com

#2 Arenlor

Arenlor

    Member

  • Members
  • PipPip
  • 27 posts
  • Gender:Male
  • Location:Here

Posted 03 November 2006 - 02:57 PM

I read a good tip on using png2ico, also create a 32X32 image.

#3 Walkman

Walkman

    Forum Addict

  • Banned
  • 1,327 posts
  • Gender:Male

Posted 06 November 2006 - 12:10 PM

Hello,

I've downloaded the png2ico program, and I got it up on one of my sites now. Thanks alot for this info.

I do want to add, for those that don't download and install the Paint.NET and the Microsoft.NET Framework, but use their own imaging program, the command:

png2ico favicon.ico –-color 16 C:\Favicon.png

needs to be changed to:

png2ico favicon.ico C:\Favicon.png

because I've tried it that way and I get "--color: No such file or directory" message in the command line. So, after trying numerous combinations of commands to make it create the file, it finally worked when I took off the --color 16. I've saved the file in .png format and at 16 colors, and at 16x16 pix.

The issue I'm having though is that it displays in IE but not in Firefox. I've checked all my settings in Firefox, but it doesn't help. I've tested it on two computers, and the same results on both. I can however see the Bleeping Computer icon using Firefox.

Am I doing something wrong?

#4 Arenlor

Arenlor

    Member

  • Members
  • PipPip
  • 27 posts
  • Gender:Male
  • Location:Here

Posted 06 November 2006 - 01:21 PM

What's your site? And what's the code you're using? My icon shows up fine for me in FF and I used png2ico http://arenlor.ulmb.com/ see if your code matches up. Also remember to use both lines:

<link rel="icon" href="http://example.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://example.com/favicon.ico" type="image/x-icon" />

#5 Grinler

Grinler

    Bleep Bleep!

  • Admin
  • PipPipPipPipPipPip
  • 38,392 posts
  • Gender:Male
  • Location:USA

Posted 06 November 2006 - 05:13 PM

The double-dash before the colors argument is not translating right if you copy and paste it. Just type it by hand and make sure you use two - before the colors argument and it should work.

#6 Walkman

Walkman

    Forum Addict

  • Banned
  • 1,327 posts
  • Gender:Male

Posted 07 November 2006 - 01:57 AM

Hello,

I got it working now. I had to add those 2 lines of code to my index.php page. But now, I'm going to have to add those lines to the pages inside of my top directory. I'm using Dreamweaver, so I'll do a mass find/replace.

It's strange that IE recognizes favicon on my site, but with Firefox, I'll have to add those 2 lines of code on every page I want it shown.

I might be able to add it to my /includes/ folder so it'll display on all pages. I'll test it out. I'm using it on a site that has the osCommerce shopping cart.

Anyway, nice tip, and it works.

#7 Grinler

Grinler

    Bleep Bleep!

  • Admin
  • PipPipPipPipPipPip
  • 38,392 posts
  • Gender:Male
  • Location:USA

Posted 07 November 2006 - 10:20 AM

It is possible that IE looks for the favicon.ico on its own. IE tends to do non- standard approaches to web browsing.

#8 Arenlor

Arenlor

    Member

  • Members
  • PipPip
  • 27 posts
  • Gender:Male
  • Location:Here

Posted 07 November 2006 - 12:44 PM

Actually I know it does, forget where I read it, but IE will look for a "favicon.ico" and then a "favicon.png" then a "favicon.gif" to use. In case you're wondering that means that yes you don't have to name it favicon in order to use it as such, you're telling it in the code what to use as the icon. It just makes it easier for browsers who do their own thing to the internet and rewrite the genome sequencing of your computer to install to locate them on their own if you do.

#9 HIPPO1023

HIPPO1023

    Member

  • Members
  • PipPip
  • 84 posts

Posted 02 March 2007 - 06:51 AM

There is an online site that you can create your favicon.
You can create favicon of 16*16, 32*32 and 48*48 size in this site, FavIcon Generator.
:thumbsup:

#10 the-splodge

the-splodge

    New Member

  • Banned
  • 12 posts

Posted 06 March 2007 - 05:52 AM

just a heads up, there's a free plug-in for photoshop so you can save as .ico

#11 Grinler

Grinler

    Bleep Bleep!

  • Admin
  • PipPipPipPipPipPip
  • 38,392 posts
  • Gender:Male
  • Location:USA

Posted 06 March 2007 - 10:25 AM

Have a link for it?

#12 tg1911

tg1911

    Lord Spam Magnet

  • Site Admin
  • PipPipPipPipPipPip
  • 19,244 posts
  • Gender:Male
  • Location:SW Louisiana

Posted 06 March 2007 - 10:36 AM

You can also save as an .ico in IrfanView.
MOBO: GIGABYTE GA-MA790X-UD4P, CPU: Phenom II X4 955 Deneb BE, HS/F: CoolerMaster V8, RAM: 2 x 1G Kingston HyperX DDR2 800, VGA: ECS GeForce Black GTX 560, PSU: Antec TruePower Modular 750W, Soundcard: Asus Xonar D1, Case: CoolerMaster COSMOS 1000, Storage: Internal - 2 x Seagate 250GB SATA, 2 x WD 1TB SATA; External - Seagate 500GB USB, WD 640GB eSATA, 3 x WD 1TB eSATA

Become a BleepingComputer fan: Facebook

#13 HIPPO1023

HIPPO1023

    Member

  • Members
  • PipPip
  • 84 posts

Posted 09 March 2007 - 07:42 PM

I found free plugin of favicon for Photoshop, but I don't use it yet.

ReadMe
Download

#14 pcmaddeanp

pcmaddeanp

    Member

  • Members
  • PipPip
  • 147 posts
  • Gender:Male
  • Location:Southampton, UK

Posted 21 May 2008 - 09:44 AM

Hey,

This site will do it all for you without any fuss!

http://www.favicon.co.uk/

pcmaddeanp

Server Room Geek - IT Professionals Community


#15 pete2008

pete2008

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 August 2008 - 02:23 PM

This is the one I use

Free Favicons




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users