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

@devraikou/imagecord

v2.0.0

Published

Professional Discord image generation library with canvas

Readme

ImageCord

The Professional Discord Image Generation Library

npm version License Downloads

ImageCord is a high-performance, object-oriented image generation library built specifically for Discord bots. It leverages @napi-rs/canvas for speed and provides a chainable, intuitive API with built-in theming and Discord.js 14+ integration.


✨ Features

  • 🚀 High Performance: Built on @napi-rs/canvas and uses LRU caching for assets to minimize network requests.
  • 🎨 Powerful Theming: Switch between dark, dark-orange, cyber, and glass themes or create your own.
  • 🧩 Template System: Ready-to-use RankCard, WelcomeCard, and more.
  • 📦 Discord.js Ready: seamless integration—pass interactions or members directly.
  • 🛡️ Type-Safe: JSDoc typed for excellent IntelliSense support.

📦 Installation

npm install imagecord @napi-rs/canvas discord.js

⚡ Quick Start

1. Simple Rank Card

import { RankCard } from 'imagecord';
import { AttachmentBuilder } from 'discord.js';

client.on('messageCreate', async message => {
  if (message.content === '!rank') {
    
    // Create the card
    const card = new RankCard()
      .setFromDiscord(message.member) // Auto-fills username, avatar, etc.
      .setLevel(5)
      .setXP(450, 1000)
      .setRank(1)
      .setStatus("online")
      .setTheme('cyber'); // Use 'cyber' theme

    // Render to buffer
    const buffer = await card.render();

    // Send to Discord
    const attachment = new AttachmentBuilder(buffer, { name: 'rank.png' });
    message.channel.send({ files: [attachment] });
  }
});

2. Welcome Image

import { WelcomeCard } from 'imagecord';

client.on('guildMemberAdd', async member => {
  const channel = member.guild.channels.cache.get('WELCOME_CHANNEL_ID');
  
  const image = await new WelcomeCard()
    .setAvatar(member.user.displayAvatarURL({ extension: 'png' }))
    .setUsername(member.user.username)
    .setServerName(member.guild.name)
    .setMemberCount(member.guild.memberCount)
    .setTheme('dark-orange')
    .setBackground('./assets/bg.jpg')
    .render();
    
    channel.send({ files: [image] });
});

🎨 Themes

ImageCord includes a powerful theme engine. To switch themes:

card.setTheme('glass');

Available Presets:

  • dark (Default Discord style)
  • dark-orange (Warm aesthetic)
  • cyber (Neon/Cyberpunk)
  • glass (Translucent UI)

Custom Theme:

import { themeManager } from 'imagecord';

themeManager.register('my-theme', {
  colors: {
    background: "#000000",
    primary: "#FF0000",
    text: "#FFFFFF",
    // ...
  },
  font: "Arial"
});

card.setTheme('my-theme');

💡 Performance Notes

  • Caching: Avatars and backgrounds are automatically cached in memory (LRU).
  • Font Loading: Fonts are registered once globally.
  • Async Rendering: All heavy I/O is asynchronous to prevent blocking the event loop.

👨‍💻 Author

Raikou


Verified for Discord.js v14+ and Node.js 16+