Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Node.js
  3. terminal-image

terminal-image

MITJavaScriptv4.3.0

Display images and animated GIFs in the terminal using ANSI escape codes and native terminal protocols.

GitHubGitHub
1.1k stars30 forks0 contributors

What is terminal-image?

terminal-image is a Node.js library that enables developers to display images and animated GIFs directly in terminal emulators. It solves the problem of visualizing image content in command-line interfaces by automatically detecting and using the best available terminal graphics protocol or falling back to ANSI block characters.

Target Audience

Node.js developers building CLI applications, tools, or scripts that need to display image previews, logos, or visual content within terminal environments.

Value Proposition

Developers choose terminal-image for its zero-configuration protocol detection, support for animated GIFs, and universal compatibility across terminals—from modern graphics-capable emulators to basic ANSI environments.

Overview

Display images in the terminal

Use Cases

Best For

  • Displaying image previews in CLI file managers or image utilities
  • Adding visual branding (logos) to terminal-based applications
  • Creating terminal-based image viewers or slideshows
  • Showing animated progress indicators or status visuals in build tools
  • Debugging image content directly in development workflows
  • Building educational tools that visualize concepts in the terminal

Not Ideal For

  • Web applications requiring browser-based image rendering
  • Environments where only monochrome or text-only terminals are available
  • Projects needing advanced image processing like filters or transformations

Pros & Cons

Pros

Automatic Protocol Detection

Automatically selects the best terminal protocol (Kitty, iTerm2, or ANSI) for optimal image quality, as detailed in the Terminal Protocol Support section.

Animated GIF Playback

Provides dedicated methods for GIFs with configurable frame rates and custom render handlers, enabling smooth animations in supported terminals.

Flexible Image Scaling

Allows scaling by percentage of terminal dimensions or exact row/column counts, with optional aspect ratio preservation, as shown in usage examples.

Universal Fallback Compatibility

Uses ANSI block characters with 24-bit color as a fallback, ensuring it works in any terminal that supports colors, per the README.

Cons

Limited Format Support

Only supports PNG, JPEG, and GIF; lacks modern formats like WebP or SVG, which could be a limitation for some use cases.

GIF Frame Rate Limitations

Maximum frame rate is capped at 30 FPS and ignored in iTerm, potentially affecting the smoothness of fast animations.

Terminal Dependency

Image quality heavily depends on terminal capabilities; in basic terminals, the ANSI fallback produces lower-resolution block art.

Frequently Asked Questions

Quick Stats

Stars1,097
Forks30
Contributors0
Open Issues0
Last commit16 days ago
CreatedSince 2018

Tags

#terminal-graphics#terminal#npm-package#ansi-escape-codes#nodejs#image-rendering#cli-utility#cross-platform#image#cli-tools

Built With

N
Node.js

Included in

Node.js65.5k
Auto-fetched 6 hours ago

Related Projects

zxzx

A tool for writing better scripts

Stars45,438
Forks1,259
Last commit9 days ago
InkInk

🌈 React for interactive command-line apps

Stars38,057
Forks975
Last commit12 days ago
chalkchalk

🖍 Terminal string styling done right

Stars23,166
Forks962
Last commit3 months ago
Inquirer.jsInquirer.js

A collection of common interactive command line user interfaces.

Stars21,520
Forks1,352
Last commit6 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub