technodelight / php-cli-iterm-image-renderer
Render images with PHP in your iterm2 console
Installs: 790
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/technodelight/php-cli-iterm-image-renderer
Requires
- technodelight/shell-exec: ^1.0
This package is auto-updated.
Last update: 2025-09-29 02:51:25 UTC
README
Render images with PHP in your iterm2 console
usage
#!/usr/bin/env php
<?php
use Technodelight\ITermImage\Image;
$image = Image::fromUri('https://picsum.photos/200', 200);
if (!empty($image)) {
echo $image;
}
Running the above script will render a random picsum image in your terminal, 200 px wide.
requirements
This library was built to work with the famous iTerm2 OS X application. It has a basic fallback version to render the URI instead of the image, if the current iTerm does not support displaying images (or you're not using iTerm2 at all).