Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Php Cli Image

Php Cli Image Laravel Package

ixnode/php-cli-image

ixnode/php-cli-image renders images directly in the terminal, converting pictures into ANSI or ASCII output for command-line tools, scripts, and Laravel artisan commands. A lightweight helper for adding visual flair to PHP CLI applications.

Deep Wiki
Context7

ixnode/php-cli-image renders images directly inside your terminal using ANSI escape sequences and truecolor support. It converts common image formats into colored block or character output, making it easy to preview, debug, or add visual feedback to PHP and Laravel CLI applications without leaving the console.

  • Terminal rendering via ANSI/truecolor blocks or ASCII characters
  • Image conversion for PNG, JPEG, GIF, and other GD-supported formats
  • Resizable output to fit terminal width and height
  • Framework-agnostic PHP API, easy to wire into Laravel commands
  • Lightweight with no external runtime dependencies beyond GD
Frequently asked questions about Php Cli Image
How do I install ixnode/php-cli-image with Composer in Laravel?
Run composer require ixnode/php-cli-image in your Laravel project. The package is a CLI-oriented PHP library, so you can use its classes directly in Artisan commands or other command-line code. If the package provides Laravel auto-discovery or configuration, follow the README for any optional setup.
What does ixnode/php-cli-image output: ASCII art or ANSI truecolor?
It converts an image into an ASCII string for terminal display and can render that output using ANSI truecolor for color previews. You get a text-based representation sized for the console rather than an image file. This makes it useful for CLI previews, debugging, and dashboard-style output.
Which image formats can PHP CLI Image convert to ASCII?
It is designed to load common image formats through PHP's image handling, typically JPEG, PNG, and GIF. Support for formats such as WebP or AVIF depends on your PHP build and image extension. Check the README for the exact supported format list.
How do I resize an image to fit my terminal width?
The library includes resizing so previews fit the console. Set the target width to your terminal column count and preserve the aspect ratio to avoid wrapping or distortion. See the README for the exact resize options and method names.
Can I render images inside Laravel Artisan commands?
Yes. You can call the library from an Artisan command to print image previews to the console. It fits debugging, dashboards, and interactive command-line tools. Keep target sizes modest so the output stays readable in a terminal.
Does ixnode/php-cli-image require GD or Imagick?
It needs a PHP image extension to decode and resize images, commonly GD or Imagick depending on the implementation. Install and enable the required extension in your PHP CLI SAPI, not just FPM. The package composer.json and README list the exact requirement.
Why are the colors wrong or missing when rendering images in the terminal?
ANSI truecolor requires a terminal that supports 24-bit color; modern terminals usually do, but CI logs or limited TERM settings may strip or approximate colors. Verify COLORTERM and TERM, and ensure ANSI escape sequences are not being escaped or filtered. Also check that color output is enabled in the package options.
Is ixnode/php-cli-image safe to use for production dashboards and debugging output?
It is intended for CLI output such as Artisan commands, debugging, dashboards, and interactive tools. Rendering large images can be CPU- and memory-intensive, so resize before conversion and avoid doing it on every web request. Cache generated ASCII output when the same preview is reused.
How should I test image-to-ASCII output in PHPUnit?
Use a small fixture image and assert the returned string shape, such as line count or expected characters, rather than exact terminal colors. For deterministic tests, disable or normalize ANSI sequences if the API allows it; otherwise strip escape codes before assertions. Snapshot tests can help catch rendering changes.
Which PHP and Laravel versions are supported, and how is ixnode/php-cli-image maintained?
Check the package composer.json for PHP version constraints and any Laravel requirements, and review the repository release history for maintenance activity. Because the library is a CLI-focused Composer package, Laravel compatibility usually depends on your application's PHP version rather than framework-specific APIs. Prefer a version range that matches your production PHP runtime.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource