Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use a SVG toolbar icon?

Can I use an SVG file for a toolbar icon instead of creating PNG files in several sizes?

I read the following in the Chrome Developer documentation for the browserAction icon:

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.

-- here

Since WebKit supports SVG images, it stands to reason that I would be able to use an SVG icon. The lack of support for unpacked extensions seems odd, but it's easy enough to pack my extension.

Unfortunately, after I pack my extension and try to install it by dragging it to the Extensions tab in Chrome, it says Could not decode image: logo.svg...

extension error message

Image is very simple. I created it in Inkscape and saved it using "Save as type: Plain SVG (*.svg).

like image 598
Vince Avatar asked Dec 06 '18 05:12

Vince


Video Answer


1 Answers

Unfortunately, you cannot use SVG as a toolbar icon and you need to generate a png of different sizes.

like image 111
Sergii Rudenko Avatar answered Sep 22 '22 10:09

Sergii Rudenko