HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
hzeller
timg
C++2017–2026
hzeller / timg

timg

A terminal image and video viewer.

12Distinct people
13Mentions
0Explicit recommenders
2.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A terminal image and video viewer.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2017-03-18 16:26:45 UTC to 2026-07-11 08:01:09 UTC.

012342017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC312
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

13 sources
He makes some good points. Anki is indeed popular, so this is true too. I am using my own set of flashcards via self-written computer programs, mostly small scripts. The core is simple: one "side" has the question, the other "side" has the answer. I enhanced this on the commandline though, e. g. I can refer to local images (we can show this on the terminal, e. g. I use KDE konsole and then some different commandline programs to show things there. I can even show individual slides of .pdf pages via https://github.com/hzeller/timg, which is pretty cool since I can control which pdf file to show, sometimes manipulating them before showing that). The author of that blog post at lesleylai, though, is wrong in some regards. For instance: > don’t memorize what you don’t understand I totally understand what he means, e. g. "understand it first b
Read the rest
efore memorizing", and while this is in some ways true, in other ways it is not. I literally had to memorize crap knowledge in order to pass some exams. Some of it was simply boring to no ends, other things were too complicated, but in BOTH cases, being able to memorize it, helped. I may not always understand everything, but being able to connect at the least some parts, did help, just like a spider web that is built up slowly. With that I could lateron learn more, connect more and so forth. So, while I do agree that understanding is better, sometimes you can not, perhaps you lack time. Even in ALL these cases I had over the years, it still was better to be able to memorize even trivial facts. Of course eventually you have to be picky as to what knowledge you want to store in the brain, since I think it can not store infinite knowledge really (just about everyone forgets stuff eventually), but if your goal is to e. g. pass some exams quickly, then being able to quickly memorize even trivial crap, can be useful. There are a few other things I disagree with too, but for the most part I think this is a very useful blog entry. I am curious what people use else, e. g. other than anki and so forth. Or they may have other learning tricks. I always try to re-align my knowledge when it is for an important topic I care about; topics I once learned but never need again I kind of put into a "storage" preservation mode, e. g. if I ever need it again, I can look it up, but other than that I focus on what seems to be more important to me.
In A love letter to flashcards
I run Kitty and use this feature regularly. Most of the time, I rely on it within Yazi [1], a TUI file manager, but I can also display plots within the Julia REPL, thanks to the KittyTerminalImages.jl package [2]. It's even more crucial when I'm navigating a remote directory and need to check an image file, as I usually have timg [3] installed on those servers. Once you discover how valuable this is, it becomes a permanent part of your workflow. [1] https://yazi-rs.github.io/ [2] https://github.com/simonschoelly/KittyTerminalImages.jl [3] https://github.com/hzeller/timg
In State of Terminal Emulators in 2025: The Errant Champions
> But to make that decision, I need to see the images. I could run a bash script to generate those images in a bunch of different qualities and then view them with some kind of image viewer, but that's extra steps - and it involves creating a bunch of temporary files that I then need to clean up. That's not correct at all. You can, in fact, do all of these steps in a single command line program with Konsole (or iTerm2 on Mac, or Kitty - whatever terminal you're using, as long as it supports these features), imagemagick, and bash. $ for size in $(seq 10 10 100); do; convert -resize $size% input.png output_$size.webp; timg output_$size.webp; done timg, here, is https://github.com/hzeller/timg, but you could use anything that speaks iTerm2 or kitty. This approach generalizes easily, too; you can easily use this to vary any parameter imagemag
Read the rest
ick supports, like webp compression or posterization or dithering, and print out any parameters of the image, like size, along with the image itself. > With the web version I can snap a screenshot with CleanShot X and then drag that screenshot straight onto the web page. I instantly see the different images, pick one that looks good to me, download that and then drag it into my S3 uploading software (Transmit). In my workflow, I edit in Showfoto or Darktable, resize (or, in my case, more often dither and resize) as demonstrated, and then `cp` the appropriate selected image into my blog's main image folder. Hardly more difficult, and while you might not enjoy it, that's exactly my point - we can both make things we like, but you're asserting that LLMs massively changed the landscape overall, while I'm not using them at all. I also have a script, which took about one minute to write, that cleans up the extra temporary images, so that's not much of a concern either.
In Programming with ChatGPT
This kind of nerd-sniped me. We already have good compression algorithms that describe images that the human-brain can see, as well as the "portion" of images that the human brain can't tell the difference very easily. In particular: JPEG compression. Similar pictures with similar information are compressed into the same image. JPEG deletes huge chunks of the image's information, under the assumption that the human eye / brain doesn't seem to tell the difference between them. Why not do this in reverse: Turn a 128-bit hash into a 128-bit JPEG image through "some manner". Would that work? Maybe a bit of work needs to be done (ensure that colorblind users see the same result... so fully random JPEG images isn't useful). Maybe monochrome JPEG images? Surely a 32x32 monochrome image (1024 pixels * 8-bit monocrhome == 8192 bits of data) will b
Read the rest
e sufficient space for 128-bits or 256-bits to "crawl" around? ----------- Take a very-low quality JPEG compression, but be inspired from the JPEG matrix for discrete cosine transforms for how many "bits" to spend. It seems like JPEG is a 16x16 macroblock (256 pixels). 4-macroblocks would make a 32x32 image. If we're working with a huge hash (ex: 512-bit SHA3), that's 128-bits of data we'll need to differentiate per 16x16 macroblock. That seems usable?? Converting the JPEG into ASCII art though would be the hardest part though! But I feel like that part has been solved already by weird Linux programs (play Doom on a Linux console and whatnot) EDIT: https://github.com/hzeller/timg Seems like modern consoles can view very crude low-resolution images. Something like a 32x32 picture is probably usable on modern consoles. ------- JPEGs have that whole "discrete fourier cosine transform" thing that grossly complicates the algorithm though. PNGs are simpler: largely run-length encoding based off of zlib compression. The idea of a "white" block being copied for "0 to 15" pixels (4-bits given to the runlength-encoder, 4-bits selected for the "color") might be an easier "artification" step with more obvious differences in display. 512-bits / 8 (4-bit color + 4-bit runlength) == 64 runs. A 32x32 square has 1024 pixels, so your 64-runs of average length 7.5 will average 480-pixels long (well within the 1024-pixels of a 32x32 square == 1024 pixel square).
In The Drunken Bishop Algorithm
Some other differences are given at https://news.ycombinator.com/item?id=13906483 . One problem that all of these programs share is something that you cannot really do much about absent user-supplied information, since it is something that isn't exposed in the abstraction of a POSIX General Terminal Device. It is probably more acute for tv than for the others, albeit that as I have mentioned I couldn't get tv to actually run without error to see what the effect is. This problem is that there is a baked-in assumption about the glyphs of the characters. This is not the usual concern that glyphs are different shapes in different fonts. That's not really much of a concern for box drawing and block graphic characters. The baked-in assumption is that glyphs are rectangular, with a 1:2 aspect ratio. This is the assumption that underpins the
Read the rest
idea that U+2580 is two square pixels, one atop the other. But this is not true even for 9x15 fonts, which yield a slight distortion with all of these programs, let alone for yet squarer fonts. Barack Obama looks very odd indeed when U+2580 is actually a 16x16 or 32x32 square, as it sometimes is. (http://fileformat.info/info/unicode/char/2580/fontsupport.ht... shows several square appearances, and it is square in one of the fonts that I use here.) tv, with the way that it already works, is probably best placed to incorporate user-supplied information about the font's character cell aspect ratio. pxl could probably be extended fairly simply, too. The others including timg, I suspect would be harder. Interestingly, M. Zeller has had an open issue about this for timg since 2016. * https://github.com/hzeller/timg/issues/4
In Timg – Terminal Image Viewer
There is no real reason that any of them would not, SSH not involving decoding and then reëncoding terminal control sequences. The more relevant concerns would be whether they worked with tmux, screen, and mosh, which do involve that; and whether the terminal emulator on the local end of one's SSH connection supports 256x256x256 RGB colour control sequences. That said, one of the issues on timg's issues list deals in the sheer amount of superfluous data that are generated and that that thus have to be transmitted across an SSH connection or a serial device. There is no optimization of the colour change control sequences at all. pixterm similarly does zero optimization, but no-one has pointed that out yet. * https://github.com/hzeller/timg/issues/13 pxl, mentioned elsewhere on this page, does optimize colour control sequences and indeed
Read the rest
uses an ncurses-style double-buffer mechanism to optimize re-drawing.
In Timg – Terminal Image Viewer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.