cPanel Plugin Icons @2x
Taking a look at the cPanel plugins docs [url=https://docs.cpanel.net//SDK/Guide+to+cPanel+Plugins+-+Add+Plugins+to+Version+11.44+and+Later]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
-
You can indeed. We'll get the docs updated. 0 -
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.0 -
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.0 -
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:[ { "id": "sprout_sbm", "icon": "sprout.svg", "name": "SproutBox Backups", "order": 999, "group_id": "files", "type": "link", "uri": "sprout-sbm-redirect.php" } ]0 -
Turns out it was an issue with the SVG. Got it reexported and it's working wonderfully, thanks Adam :) 0 -
Turns out it was an issue with the SVG. Got it reexported and it's working wonderfully, thanks Adam :)
You bet. Our docs team has updated that document as well to encourage the use of SVG now too.0
Please sign in to leave a comment.
Comments
6 comments