Sublime Forum

Inline Images


Displays images inline to enhance comments in code. Sometimes it can be useful to explain something with an image. It detects Markdown-style image links in single line comments: // ![](example.png).



Thanks , but it doesn’t seem to be working for me on ST4. These are the settings I have set:

// File extensions to enable this plugin for
"extensions": [".md"],

// Maximum width applied to all images.
// NOTE: If your view buffer goes blank, this number is too high.
"img_maxwidth": 1024,

// set to true if you want remote images to be loaded and displayed on_load
"show_remote_images_on_load": true,

// set to true if you want local images to be displayed on_load
"show_local_images_on_load": true,

// set to true if you want local images to display on_post_save
"show_local_images_on_post_save": false,

// set to true if you want remote images to display on_post_save
"show_remote_images_on_post_save": false,



Did you install MarkdownImages? That’s not my plugin.

Try restarting Sublime. It has bugs…



No. I installed your plugin. Added the github repo first and installed it through package control. I also restarted Sublime Text.



Hmm. Well, if you look at this file

there is no "extensions" setting, because I changed it to "syntax_filter". You don’t have my addon. And I believe my addon doesn’t actually work for Markdown. Do you even want my addon? :slight_smile:

How exactly did you install it? What do you mean by “added the github repo”? Which one? How did you install through Package Control? I put in a pull request but it didn’t go through yet. My addon is not on Package Control.

Sorry, but I’m super confused. This is the first time I’ve released an addon.



I removed that. Still didn’t work.

I do.

Well that figures.

I have it installed.

Your repository.

I clicked on the green button on github. copied the url. open the command palette. select add repository. paste the url. the rest is history.

1 Like


Hey, thank you for the detailed reply. Sorry that it’s so difficult to get it to work. :frowning:

I added Installation instructions. Hope it helps.

I’ve never used Package Control’s Add Repository before. I couldn’t get it to work either with my addon. It says “successfully added”, but it doesn’t seem to do anything.

I hope that the addon will be added to Package Control soon, which should make installation much easier.

1 Like


This command adds the repository you give it to the list of packages that it knows about; you still have to Package Control: Install Package and choose it from the list to install it.



Oh, nice. That almost works. The plugin is loaded, and loads images.

The URL that I add is That causes Package Control to create a Sublime-Inline-Images.sublime-package. However, my addon expects to be called “Inline Images”.

Here’s how I implemented loading the settings:


Is there a way to tell Package Control the name of my addon? Or a better solution for loading the settings file? I could not find documentation of even this ${packages} variable, are there other variables like this?



Packages installed this way indeed take their name from the repository that they come from.

In cases where the name of the repo doesn’t match the name of the package, there needs to be a mapping that tells PC what to name things. One way to do that is in the channel file (where you made your PR) ; there’s a field that you can use to specify the name of the package.

For packages installed this way, you can open the settings for Package Control and include this setting:

	// This helps solve naming issues where a repository it not named the
	// same as the package should be. This is primarily only useful for
	// GitHub and BitBucket repositories. This mapping will override the
	// mapping that is retrieved from the repository channels.
	"package_name_map": {},

It’s empty by default as seen here, but you can use this to map the name of the repository to the name of the package; then when you install, PC will name it correctly.

1 Like


Hmm, that is not ideal. I wouldn’t want to tell people in the installation instructions that they have to change the PaCo settings…

I tried to add this JSON from my pull request as a channel, because it has a “name” entry.

			"name": "Inline Images",
			"details": "",
			"releases": [
					"sublime_text": ">=4000",
					"tags": true

But that didn’t work either.



If you add a JSON file, it needs to look like this:

If you’re storing it on GitHub, you can provide the URL to the JSON file directly, but use the raw version of the URL. such as is described here:



Hmm I think that’s what I did. Here’s the URL:



To be clear, my comment was meant to mean that you need to include an entire file including the structure outlined, not just the segment that you posted in your question.

It’s also worth pointing out that Package Control won’t list packages that are already installed.



I couldn’t get the channel thing to work, but it doesn’t matter. I’ll just wait for my PR to go through.

With the package_name_map setting I was able to make sure that PaCo is going to work, so that’s very good. Thank you for your help, OdatNurd.

1 Like


Does anybody know why my PR for Package Control is not getting merged? It’s been 10 weeks, and nothing’s happening. Did I do something wrong? Did I miss something?



No, it’s just that reviewing is a slow, rarely appreciated task. Yours may be particularly dicey because it automatically downloads arbitrary resources from the big-I Internet. I don’t know what the implications might be if it was a malicious URL.

Don’t get me wrong, your package is neat. I’m just speculating about why it might be taking longer than other packages that could be easier to review.



To add to those facts, all of the reviewing is voluntary work done by the members of the community in their free time. No one is paid a full time salary to work on reviewing packages. So I guess you need to have lots of patience as well and wait for the review to complete.



I added some improvements points for the package. Note that I don’t have permissions to accept packages, but thought I’d help with reviewing it.