Skip to content

[FEATURE] Add an icon url field #8878

Closed

Description

@justjam2013

Add a icon url field to the package.json spec, which would be returned in the search results.

Edit: This link would be available in the search API results.

So, using the example result from a search below, a field would be returned in the package object:

{
  "objects": [
    {
      "downloads": {
        "monthly": 17877,
        "weekly": 3863
      },
      "dependents": "177",
      "updated": "2025-12-22T14:06:11.084Z",
      "searchScore": 294.53653,
      "package": {
        "name": "homebridge-lib",
        "keywords": [
          "homekit",
          "homebridge"
        ],
        "version": "7.2.0",
        "description": "Library for homebridge plugins",
        "sanitized_name": "homebridge-lib",
        "icon": "homepage": "https://github.com/ebaauw/homebridge-lib/path/to/icon_file.png",
        "publisher": {
          "email": "[email protected]",
          "username": "ebaauw"
        },
        "maintainers": [
          {
            "email": "[email protected]",
            "username": "ebaauw"
          }
        ],
        "license": "Apache-2.0",
        "date": "2025-12-08T13:57:14.187Z",
        "links": {
          "homepage": "https://github.com/ebaauw/homebridge-lib#readme",
          "repository": "git+https://github.com/ebaauw/homebridge-lib.git",
          "bugs": "https://github.com/ebaauw/homebridge-lib/issues",
          "npm": "https://www.npmjs.com/package/homebridge-lib"
        }
      },
      "score": {
        "final": 294.53653,
        "detail": {
          "popularity": 1,
          "quality": 1,
          "maintenance": 1
        }
      },
      "flags": {
        "insecure": 0
      }
    }
  ],
  "total": 1,
  "time": "2025-12-25T20:42:48.227Z"
}

Activity

  1. adithya1770 commented on Dec 28, 2025

    @adithya1770

    Hey, I would like to work on this issue. I think it requires an RFC.
    Please let me know if there’s a preferred repo or process I should follow.
    Thanks!

  2. v-kchindam-infy commented on Dec 29, 2025

    @v-kchindam-infy

    @justjam2013 Thanks for taking the time to share your idea! New ideas are always appreciated and are better suited for our RFC repo instead since that's the right place in order to get more attention from the rest of the team and the community.

    Can you create an RRFC in that repo?

  3. justjam2013 commented on Dec 29, 2025

    @justjam2013
    Author
  4. adithya1770 commented on Dec 30, 2025

    @adithya1770

    I have created an RFC for this.

  5. justjam2013 commented on Dec 30, 2025

    @justjam2013
    Author

    @adithya1770 I have added a comment to your RFC, indicating that the link would be available in the search API results, so any client would be able to display the icon. This was the original purpose for this feature suggestion, but expanding it to the npm website makes sense.

    Also, I originally envisioned this as allowing for sharing an icon primarily from a github repo without having to package it into the tarball. So maybe it could be moved to the links object:

            "links": {
              "homepage": "https://github.com/ebaauw/homebridge-lib#readme",
              "repository": "git+https://github.com/ebaauw/homebridge-lib.git",
              "bugs": "https://github.com/ebaauw/homebridge-lib/issues",
              "icon": "https://github.com/ebaauw/homebridge-lib/path/to/icon_file.png",
              "npm": "https://www.npmjs.com/package/homebridge-lib"
            }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions