npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

metascraper-logo-bimi

v5.56.2

Published

Metascraper logo fallback that resolves brand marks from BIMI DNS TXT records.

Readme

Why

BIMI is the standard behind the brand logo mailbox providers show next to an email. Domains publish it as a TXT record:

$ dig +short TXT default._bimi.microlink.io
"v=BIMI1; l=https://cdn.microlink.io/logo/logo.svg;"

The specification constrains the logo to SVG Tiny P/S: vector, square, and transparent, which is exactly the shape a logo is expected to have.

The record is published in the domain's own DNS, so it is self asserted: the same level of trust as og:logo. Domains may also publish a Verified Mark Certificate under a=, where a certificate authority has attested the mark against the trademark owner, but this package does not read or validate it.

That makes it a higher quality source than a favicon, and it doesn't need the markup: a single DNS lookup, so it works even when the page is JavaScript rendered or unreachable.

Coverage is the trade-off. It's common among large brands and rare in the long tail, so pair it with metascraper-logo and metascraper-logo-favicon.

Install

$ npm install metascraper-logo-bimi --save

Usage

Rules are evaluated in the order the packages are declared, so put it first to prefer the BIMI published logo over anything found in the markup:

const metascraper = require('metascraper')([
  require('metascraper-logo-bimi')(),
  require('metascraper-logo')(),
  require('metascraper-logo-favicon')()
])

The lookup is done against the registrable domain, meaning https://blog.example.com/post resolves default._bimi.example.com.

API

metascraper-logo-bimi([options])

The record is read by bimi-url, and every option is passed to it: gotOpts, keyvOpts, resolveLogoUrl, resolveTxt, and selector are documented there.

Supplying your own resolveTxt is the common one, since node:dns resolves with no timeout by default:

const { Resolver } = require('dns').promises

const resolver = new Resolver({ timeout: 2000 })

const metascraper = require('metascraper')([
  require('metascraper-logo-bimi')({
    resolveTxt: hostname => resolver.resolveTxt(hostname)
  })
])

The same seam takes a DNS over HTTPS resolver, so the lookup leaves through the same egress as the rest of your traffic. bimi-url has that example.

createGetLogo, resolveLogoUrl and toLogoUrl are re-exported from bimi-url for use outside a metascraper rule.

License

metascraper-logo-bimi © Microlink, released under the MIT License. Authored and maintained by Microlink with help from contributors.

microlink.io · GitHub microlinkhq · X @microlinkhq