Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: display image files in the teminal #101

Closed
webxl opened this issue Jul 15, 2016 · 21 comments
Closed

Feature: display image files in the teminal #101

webxl opened this issue Jul 15, 2016 · 21 comments
Labels
help wanted Contributions wanted towards the issue 🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper

Comments

@webxl
Copy link

webxl commented Jul 15, 2016

aka imgcat: https://www.iterm2.com/documentation-images.html

@nirfse
Copy link

nirfse commented Jul 29, 2016

I would like to specify request for inline images. Thus ls *.jpg would render a list of thumbnails in current directory.

@matheuss matheuss added 🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper help wanted Contributions wanted towards the issue labels Jul 29, 2016
@jorgegonzalez
Copy link

I would like to attempt this. Any advice on where/how to start?

@samuelhnrq
Copy link

Well 3 months now and still no word, are you @jorgegonzalez still on this? I would like to help if possible, does anyone have any advice on how to start tackling this feature?

@DuIslingr
Copy link

Well seeing as they now seem to be planning to migrate to xterm.js you might want to hold off on this for now. #1275

@MartyGentillon
Copy link
Contributor

MartyGentillon commented Jun 11, 2017 via email

@MartyGentillon
Copy link
Contributor

MartyGentillon commented Jun 11, 2017 via email

@lucasqueiroz
Copy link

The issue still happens on v2 with xterm.
Using imgcat, the image is not displayed in my terminal.

@blahsd
Copy link

blahsd commented Jan 23, 2018

The issue still happens.

@Moelf
Copy link

Moelf commented Jul 3, 2018

almost 2 years after initial request?

@joshgarde
Copy link

Thanks for the effort on this but I don't think we'll be moving forward with this any time soon. I'd say we should hold off on supporting this until we get more of the current stories finished up, have a good plan on how to handle varying height rows and we're sure we want to commit to supporting this (is it a security issue for apps being able to add tracking images?).
xtermjs/xterm.js#1577 (comment)

Damn - was imagining all the weird things I could potentially do with this... a on-server try-catch-stackoverflow solution using a terminal based QR code would be funny af.

@nrgapple
Copy link

I'm guessing we still don't have images in hyper?

@rockyFierro
Copy link

it's 2020... still no images... no water... no hope... james took the last of the supplies... i can hear them getting closer at night, becoming unafraid of the campfire... how much longer can we last without images...

@MartynF
Copy link

MartynF commented Jun 11, 2020

Sticking a oar in...

Would it not better for hyper to recognise and render html rather than images? It should then be trivial to write a hyper-cat script that could encapsulate any particular file type supported by html that can be inlined.

Use case: I ssh to a remote server, and I still want to read html files, view svml graphics and jpegs, without a seperate utility for each.

@joshgarde
Copy link

That'd likely lead to a remote code execution vulnerability. It'd be a lot more work to render full HTML than to render just images because of the context isolation that would need to be added in.

@MartynF
Copy link

MartynF commented Jun 16, 2020

Surely its pretty simple to not run embedded code.... ?

@joshgarde
Copy link

Perhaps just a little bit more complex than just displaying images. We'd have to create a new BrowserWindow instance and disable javascript. Then we'd probably use offscreen rendering to grab a bitmap of the rendered HTML to display in the main Hyper instance. So at the end of the day we're back to the "displaying images in Hyper" again lol

@LabhanshAgrawal
Copy link
Collaborator

LabhanshAgrawal commented Jun 16, 2020

iterm2 is doing it by adding a set of proprietary escape sequences for identifying and displaying images. Since we don't really handle the parsing and rendering ourselves, it might be better to request this on https://github.com/xtermjs/xterm.js

@joshgarde
Copy link

It might be a bit better to build this out as a xterm addon since there's not really an open standard for supporting images in the terminal. Since iTerm2 is GPL licensed, would supporting its escape sequence require the code to be GPL licensed as well?

@mooocow123
Copy link

Sorry if I don't know enough about this, but they could display the HTML in a sandboxed iframe.

@LabhanshAgrawal
Copy link
Collaborator

Image support added in #6987 , will be in the next canary release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions wanted towards the issue 🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper
Projects
None yet
Development

No branches or pull requests