Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome extension icon not appearing?

I'm trying to get an icon to appear for an extension at chrome://extensions/ page. My manifest is as follows:

{
  "name":"Hello World",
  "version" : "1.0",
  "description":"Hello World",
  "icons": {                   
    "19": "icon19.png",
    "38": "icon38.png",
    "48": "icon48.png",
    "128": "icon128.png"  
  },    
  "browser_action": {
    "default_icon": {                   
      "19": "icon19.png",
      "38": "icon38.png",
      "48": "icon48.png",
      "128": "icon128.png"        
    }
  },
  "manifest_version": 2
}

As you can tell, I've tried putting icons all over. They are all the corresponding size, but I simply cannot get an icon to appear in the extensions menu. Thanks in advance.

like image 526
user3666035 Avatar asked May 22 '14 16:05

user3666035


People also ask

Why is my Chrome extension not showing up?

Head to More tools > Extensions. Use the toggle for each extension to turn it off. Restart Chrome and go back to the extensions list. Re-enable the extensions.

Where is the extension icon in Chrome?

Open the Extensions by clicking the puzzle icon next to your profile avatar. A dropdown menu will appear, showing you all of your enabled extensions. Each extension will have a pushpin icon to the right of it. To pin an extension to Chrome, click the pushpin icon so that the icon turns blue.

How do I get my Chrome extensions back?

If you are using extensions in your Google Chrome web browser, such as Snap & Read, Co:Writer, Kurzweil or Read&Write, you may have come back from summer break and can't find them in your Chrome browser. Until recently you turned on/off your extensions in Google's Chrome web browser by going into Settings > Extensions.


2 Answers

  • The manifest key that controls the icon in chrome://extensions/ is icons.48.

    So, make sure your file "icon48.png" exists and is in the right place.

  • Also, documentation mentions:

    You may provide icons of any other size you wish, and Chrome will attempt to use the best size where appropriate.

    You can also provide icons that are not of the "announced" size, e.g. a 128x128 icon for a 48x48. It will be scaled as necessary; but it's best to create a scaled version yourself.

  • It should be of an appropriate format.

    Static images can be in any format WebKit can display, including BMP, GIF, ICO, JPEG, or PNG. For unpacked extensions, images must be in the PNG format.

  • Finally, make sure you reloaded your extension after making those changes.

like image 60
Xan Avatar answered Sep 28 '22 09:09

Xan


The issue in my case was the format of icons, I was using jpeg format (and doc says: Icons should generally be in PNG format, because PNG has the best support for transparency. They can, however, be in any format supported by WebKit, including BMP, GIF, ICO, and JPEG.) but still it wasn't working. I converted the icons to png format and it worked.

like image 41
Rishabh Agrahari Avatar answered Sep 28 '22 10:09

Rishabh Agrahari