Markdown Images
Sublime Text 3 plugin to render images in markdown files
Details
Installs
- Total 10K
- Win 5K
- Mac 3K
- Linux 2K
Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 6 | 0 | 4 | 4 | 6 | 3 | 4 | 3 | 0 | 5 | 5 | 6 | 1 | 7 | 1 | 3 | 5 | 3 | 4 | 4 | 2 | 3 | 1 | 0 | 0 | 7 | 6 | 4 | 6 | 1 | 7 | 7 | 5 | 1 | 3 | 7 | 5 | 5 | 7 | 5 | 9 | 9 | 9 | 3 | 3 |
Mac | 1 | 3 | 0 | 0 | 2 | 8 | 6 | 8 | 0 | 3 | 3 | 4 | 4 | 3 | 3 | 6 | 2 | 1 | 0 | 3 | 1 | 3 | 4 | 0 | 0 | 6 | 3 | 6 | 5 | 5 | 3 | 2 | 1 | 2 | 2 | 2 | 0 | 1 | 3 | 3 | 5 | 5 | 1 | 3 | 3 | 1 |
Linux | 0 | 1 | 0 | 0 | 1 | 5 | 2 | 2 | 3 | 1 | 0 | 3 | 2 | 3 | 2 | 2 | 2 | 0 | 2 | 0 | 2 | 0 | 5 | 1 | 2 | 0 | 4 | 1 | 3 | 1 | 1 | 2 | 2 | 1 | 1 | 3 | 2 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 1 | 2 |
Readme
- Source
- raw.githubusercontent.com
Markdown Images
This is a Sublime Text 3 plugin to render images inside of markdown files.
Usage
Images in markdown use the 
markup. Wherever this appears, this plugin can render the image specified by the URI below the line.
You can configure an image's dimensions by adding HTML <img>
properties after the image markup: {width="200", height="200"}
. Everything between the {}
will be copied to the <img>
element that renders the image.
If the URI points to a file on disk, it is called a “local” image, and renders by default. If the URI points to an external (http, https, etc) resource, it is called a “remote” image, and does not render by default.
You can choose to show local, show remote or show all images from the command palette and with the configuration settings.
Installation
You can install this package using Package Control using the name “Markdown Images”.
For development, you will want to clone the repository into “Markdown Images” directory in the Sublime Text’s Packages
directory (Preferences
→ Browse Packages…
):
git clone git@github.com:xsleonard/sublime-MarkdownImages.git 'Markdown Images'
(Or create a symlink with such name from your projects directory.)
Configuration
By default, images are rendered when the file is first loaded. This can be configured with the show_local_images_on_load
and show_remote_images_on_load
settings.
Images can rendered on save with the show_local_images_on_post_save
and show_remote_images_on_post_save
settings.
Go to Sublime Text -> Packages -> Package Settings -> MarkdownImages
(macOS menu) to edit your configuration.
Refer to the default configuration file.
Commands
markdown_images_show(show_local: bool, show_remote: bool)
- Show images from the local filesystem and/or remote URLsmarkdown_images_hide()
- Removes all rendered images from the view
These can be activated with the command palette (cmd+shift+p
):
MarkdownImages: Hide Images
MarkdownImages: Show All Images
MarkdownImages: Show Local Images
MarkdownImages: Show Remote Images
Keybindings
This plugin adds no keybindings. You can set your own keybindings to the commands.
Notes
Only PNG, JPG and GIF images are supported.
SVG does not render inside of ST3 Phantom objects, unfortunately.
Remote image loading runs in the main thread so it will stall ST3. Remote image loading is disabled
Credits
The image rendering code was seeded by sublime_zk