coder / code-server

VS Code in the browser
https://coder.com
MIT License
68.7k stars 5.64k forks source link

Add support for image previews of JPEG files #7082

Open jmikedupont2 opened 1 week ago

jmikedupont2 commented 1 week ago

What is your suggestion?

Add support for image previews of JPEG files when served via the VS Code web server, allowing users to view image content directly in the browser without needing to download or open the files separately.


Why do you want this feature?

This feature would improve user experience by enabling quick visualization of image assets directly in the web server interface, which is particularly useful for web developers, designers, and anyone working with visual media. It would save time and streamline workflows, especially when dealing with multiple images.


Are there any workarounds to get this functionality today?

Currently, users can manually open JPEG files in a browser tab or use third-party tools to preview images. However, these workarounds disrupt the development workflow and are less efficient compared to having built-in preview support.


Are you interested in submitting a PR for this?

Potentially, yes, it would be a great learning experience Image

code-asher commented 4 days ago

This does actually work, but I think it might require a secure context because it relies on some browser features only available in secure contexts. Are you able to use https or add an exception for http://192.168.1.90:8080 in your browser?