Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED cPanel Plugin Icons @2x

Discussion in 'User Experience' started by Jake B., Dec 16, 2016.

  1. Jake B.

    Jake B. Member

    Joined:
    Oct 21, 2015
    Messages:
    11
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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
     
  2. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    198
    Likes Received:
    17
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    You can indeed. We'll get the docs updated.
     
  3. Jake B.

    Jake B. Member

    Joined:
    Oct 21, 2015
    Messages:
    11
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    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:

     
  4. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    198
    Likes Received:
    17
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
  5. Jake B.

    Jake B. Member

    Joined:
    Oct 21, 2015
    Messages:
    11
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    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"
        }
    ]
    
     
  6. Jake B.

    Jake B. Member

    Joined:
    Oct 21, 2015
    Messages:
    11
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    Turns out it was an issue with the SVG. Got it reexported and it's working wonderfully, thanks Adam :)
     
    Infopro likes this.
  7. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    198
    Likes Received:
    17
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    You bet. Our docs team has updated that document as well to encourage the use of SVG now too.
     
    Infopro likes this.
Loading...

Share This Page