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.
Describe the solution you'd like
Render images in direct messages, while keeping the download as a chat command?
Plan:
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 supportedink-image, this should be a toggle feature because ink-image is not supported in every terminal emulator, we can use ascii as a fallbackDescribe 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.
Tickets: #111
Tickets: #121
Tickets: #126
Tickets: #127
Tickets: #134
Tickets: #43
Tickets: #95
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 😢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-imagewe might as well just write our own image parser using these libraries.Originally posted by: endernoke
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-imageOriginally 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.
Originally posted by: endernoke
Added protocols for rendering with half blocks (like
terminal-imageand braille patterns tots-migration/imageOriginally posted by: endernoke
Might be helpful resource: https://github.com/Textualize/rich/discussions/384
Ticket changed by: endernoke
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.