Menu

#104 [Feature] Display images directly in terminal

closed
nobody
2025-09-07
2025-08-06
Anonymous
No

Originally created by: supreme-gg-gg
Originally owned by: supreme-gg-gg

Is your feature request related to a problem? Please describe.
Currently user needs to use chat command to download and view an image, which is honestly fine since it's very fast. However since we're trying to support image for feed visualiser anyways might as well do it for chat messages.

Related: [#95] [#43]

Describe the solution you'd like
Render images in direct messages, while keeping the download as a chat command?

Plan:

  1. Investigate the const items = await this.ig.feed.directThread(...)items(); endpoint, currently it shows the return type does not contain a media field so it's by default text messages only, but when playing with the endpoint seems like media and clip and other types are supported
  2. Make changes to the type (done)
  3. Use ink-image, this should be a toggle feature because ink-image is not supported in every terminal emulator, we can use ascii as a fallback

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Related

Tickets: #111
Tickets: #121
Tickets: #126
Tickets: #127
Tickets: #134
Tickets: #43
Tickets: #95

Discussion

  • Anonymous

    Anonymous - 2025-08-06
     
  • Anonymous

    Anonymous - 2025-08-07

    Originally posted by: supreme-gg-gg

    The url field does exist just not in the type we can cast it to any 😂, but rendering with the ascii approach doesn't seem to work due to random resizing error lol 😢

     
  • Anonymous

    Anonymous - 2025-08-15

    Originally posted by: supreme-gg-gg

    Ink Image is not compatible with ESM and most other terminals than iTerm, it itself is just a wrapper for another library called terminal-image we might as well just write our own image parser using these libraries.

     
  • Anonymous

    Anonymous - 2025-08-22

    Originally posted by: endernoke

    Ink Image is not compatible with ESM and most other terminals than iTerm, it itself is just a wrapper for another library called terminal-image we might as well just write our own image parser using these libraries.

    The chain of dependency boils down to using ANSI escapes to display images using iTerm2's inline image protocol.
    We might want to also support the following protocols for rendering images:

    With fallbacks to ascii or colored unicode half/quarter blocks like terminal-image

     
  • Anonymous

    Anonymous - 2025-08-22
     
  • Anonymous

    Anonymous - 2025-08-22

    Originally posted by: endernoke

    Trying to make a package that supports sixel (so images can be displayed in full resolution!) with ascii fallbacks (sixel has proven to be diabolical 😭 )
    Will let you guys know when it is ready.

     
  • Anonymous

    Anonymous - 2025-08-24

    Originally posted by: endernoke

    Added protocols for rendering with half blocks (like terminal-image and braille patterns to ts-migration/image

     
  • Anonymous

    Anonymous - 2025-08-25

    Originally posted by: endernoke

    Might be helpful resource: https://github.com/Textualize/rich/discussions/384

     
  • Anonymous

    Anonymous - 2025-09-07

    Ticket changed by: endernoke

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2025-09-07

    Originally posted by: endernoke

    Btw ink-picture has been published as a external package for displaying images.
    We'll switch out the in-house components for this soon.

     

Log in to post a comment.

Monday.com Logo