Sublime Forum

Disable image viewer?


Hi. Yesterday I wanted to open a jpg file with Sublime text, just to see the code of its header, but instead of this, the program displays the image. What is this??!! This also happens with .icos and other media files. I already have ACDSee or Photoshop for that. Is there any way to disable this and make the program opens any file as text?

And how to I change from normal text editor to HEX editor?


1 Like


I’ve tried installing the package called Hex Viewer, but it doesn’t do anything. There’s an option in the user config of this package (“auto_open” : true,) which should override this and open media files with a hex editor. Still no success.

1 Like


Author of HexViewer here. HexViewer cannot view the hex of images currently as SublimeText image views are not traditional views. You can’t get the filename from those views. It is a frustrating change. I appreciate the image previewer, but I wish you could at the very least, you could get file info from image previews.


// Auto open binary files in hex viewer
// Detects if view has encoding set to 'Hexidecimal'.
// Addtionally it can use 'auto_open_patterns' below.
"auto_open" : true

Hi. Thanks for your answer. Then, can you please clarify what is this option for?

Oh, and let me ask someting about your fantastic package: I’ve configured it to run with ctrl+alt+h, but is there any menu entry added to Sublime Text 3 somewhere to select or toggle ascii and hex views?

1 Like


Is there an issue for this?

1 Like


This is the only related issue I found:

1 Like


Then, can you please clarify what is this option for?

It’s covered in the documentation:

but is there any menu entry added to Sublime Text 3 somewhere to select or toggle ascii and hex views?

In the command palette. You’d have to put something similar in your menu file if you wanted a drop down menu. I just use command palette though:

1 Like


By the way, you can get the filename of an image via



What! :astonished:. Starting in what version?

1 Like


The SFTP package has used that since Nov 2015, so at least 3095 had it.



This makes me so happy. Hopefully I can easily tie the name to the appropriate sheet. I’d like to close the sheet with the preview and then open a hex view of it. I’ll have to check it out.

1 Like


Looks like I can convert png files to hex now. Image previews are sheets and don’t go through on_load events, so I cannot auto convert them to hex, but at least I can toggle them :slight_smile:.



Use KrojamSoft PhotoViewerPro because I was also involved such kind problem but now everything is perfect.



Any update to this problem? I was able to edit hex of sublime_text3.exe to bypass this. But in latest version 3200, can’t do that anymore.



seem this dev never care



there are no update available since last update



I was most surprised that my favourite text editor shows an image file as an image and not hex.

@facelessuser how do I ‘toggle them’?

Currently using Notepad :frowning:



Assuming you have the HexViewer plugin installed, you can run the HexViewer: Toggle Hex View command. Image views don’t get the same events that text views do, so I don’t think you can auto-detect and convert to hex, but you can manually do it.

1 Like


Now I’ve HexViewer installed I understand. Looks awesome tool - thank you!