SOLVED cPanel Plugin Icons @2x

Jake B.

Member
Oct 21, 2015
11
4
3
Chicago, IL
cPanel Access Level
Root Administrator
Taking a look at the cPanel plugins docs here it mentions that the icons must be 48x48px PNGs, but all of the default icons within cPanel are SVGs. This issue is causing all of the custom icons we've added for various things to appear very blurry on any high DPI device (macbook pros, imac, any 4k monitor with scaling enabled, etc)

Just want to know if there is a way I can use an SVG as our icon, because it seems odd to require a PNG at exactly 1x the display size when everything else within cPanel is an SVG
 

Jake B.

Member
Oct 21, 2015
11
4
3
Chicago, IL
cPanel Access Level
Root Administrator
You can indeed. We'll get the docs updated.
I assume it's a different process for SVG icons? I tried replacing my old png icon with an SVG and updating the "icon" parameter to the SVG filename, but got this error when installing:

info [install_plugin] Running sprite_generator
warn [install_plugin] sprite_generator returned a non-zero exit code, your icon may or may not appear.
 

cPanelAdamF

cPanel Product Owner
Staff member
Mar 21, 2013
251
64
153
Houston TX
cPanel Access Level
DataCenter Provider
Twitter
I assume it's a different process for SVG icons? I tried replacing my old png icon with an SVG and updating the "icon" parameter to the SVG filename, but got this error when installing:
Should be the same process, though the icon parameter in install.json for your plugin will need to point at the SVG specifically (rather than relying on a fallback mechanism to find it).

...but before we go any further, can you tell me what version of cPanel & WHM your seeing this problem on? I am able to get a testing plugin (basically just adding links to reddit to the cPanel end-user interface) to install just fine with an SVG icons however the problem you're seeing could be tied to a specific version.
 

Jake B.

Member
Oct 21, 2015
11
4
3
Chicago, IL
cPanel Access Level
Root Administrator
Should be the same process, though the icon parameter in install.json for your plugin will need to point at the SVG specifically (rather than relying on a fallback mechanism to find it).

...but before we go any further, can you tell me what version of cPanel & WHM your seeing this problem on? I am able to get a testing plugin (basically just adding links to reddit to the cPanel end-user interface) to install just fine with an SVG icons however the problem you're seeing could be tied to a specific version.
Sorry for the late reply, must not have watched the thread. I'm running the latest it shows as available in the RELEASE tier (11.60.0.28)

Here's the install.json:

Code:
[
    {
        "id": "sprout_sbm",
        "icon": "sprout.svg",
        "name": "SproutBox Backups",
        "order": 999,
        "group_id": "files",
        "type": "link",
        "uri": "sprout-sbm-redirect.php"
    }
]