Menu

Tree [b94bfb] main /
 History

HTTPS access


File Date Author Commit
 .vscode 2022-05-02 pattazl pattazl [e85375] 1. add function: can paste clipboard image and ...
 i18n 2025-06-07 pattazl pattazl [8f5a5b] 增加对 <img> 的内容替换,增加对nameFormat变量的说明
 images 2022-10-18 pattazl pattazl [826026] update screenshot
 out 2022-05-03 pattazl pattazl [edae52] 0.0.8
 src 2025-06-07 pattazl pattazl [8f5a5b] 增加对 <img> 的内容替换,增加对nameFormat变量的说明
 .eslintrc.json 2022-04-13 pattazl pattazl [2667ec] 实现VSCode的 图片分析,清理,下载功能,参考官方文档实现自己的多语言化
 .gitignore 2022-04-13 pattazl pattazl [2667ec] 实现VSCode的 图片分析,清理,下载功能,参考官方文档实现自己的多语言化
 .vscodeignore 2022-10-19 pattazl pattazl [4dbc8e] add esbuild to pack
 CHANGELOG.md 2025-06-07 pattazl pattazl [b94bfb] 更新 0.1.4的版本说明
 LICENSE 2022-04-13 pattazl pattazl [2667ec] 实现VSCode的 图片分析,清理,下载功能,参考官方文档实现自己的多语言化
 README.md 2025-06-05 pattazl pattazl [705454] 去除 hasBracket 变量控制,如果有右括号,使用 %29代替,优化图片替换时的空格控制
 README_ZH.md 2025-06-07 pattazl pattazl [b94bfb] 更新 0.1.4的版本说明
 esbuild.config.js 2022-10-19 pattazl pattazl [4dbc8e] add esbuild to pack
 gulpfile.js 2022-05-03 pattazl pattazl [edae52] 0.0.8
 icon.png 2022-04-16 pattazl pattazl [6c4ed2] 增加相关文档,更新说明
 package-linkpicgo.json 2025-06-05 pattazl pattazl [705454] 去除 hasBracket 变量控制,如果有右括号,使用 %29代替,优化图片替换时的空格控制
 package-lock.json 2025-02-14 Romantoscalion Romantoscalion [fa47c0] feat: 添加匹配尖括号格式图片链接的功能
 package.json 2025-06-07 pattazl pattazl [abbdee] 0.1.3为测试版,0.1.4为正式版,更新说明内容
 package.nls.json 2025-06-07 pattazl pattazl [8f5a5b] 增加对 <img> 的内容替换,增加对nameFormat变量的说明
 package.nls.zh-cn.json 2025-06-07 pattazl pattazl [8f5a5b] 增加对 <img> 的内容替换,增加对nameFormat变量的说明
 tsconfig.json 2023-05-22 shaolonger shaolonger [85caad] feat: 新增剔除不合法字符后图片拓展名不存在的情况下,自动根据文件buffer获取并回填拓...

Read Me

markdown-image-manage

The VSCode extension of markdown-image-manage@github.

installs
GitHub stars
JavaScript Style Guide

Overview

"markdown-image-manage" is the VSCode extension, manage the images of MD(Markdown) File by menu, and have another npm cli tool( markdown-image-manage-npm )

中文文档 Gitee 中文文档 Github

Features

The Menu show :
en.png

cn menu

Functions as following :

  1. Analysis: analyze the resource images in the MD file, list the network and local , and alarm if the local does not exist
  2. Clean up: Check all the images in the directory where the MD file's local images are located , make sure the local image's folder is the same, if not same you can use move local image or copy local image to make them same. If they are not linked in the MD file, they will be moved to the "md-img-remove" directory, the local images include .png,.jpg,.bmp,.gif,.jpeg,.ico,.tga,.rle,.tif,.cur,.ani,.iff
  3. Move/Copy: move or copy all local images in the MD file to the defined directory
  4. Clean up the invalid local image: Remove the link that the local image not exist.
  5. Download: Download all network images in the MD file to the defined directory
  6. Upload: Automatically upload all local images in the MD file to the PicBed (Depend on picgo )
  7. Upload Clipboard: Upload the clipboard's image and insert the image (Depend on picgo )
  8. The local and remote path support the variable , <filename> , <YYYYMMDD> datetime format string by dayjs ,such as <DDHHmm> and so on.
  9. Support paste clipboard image and define image's path
  10. Support the escaped/unescaped image URL
  11. Convert the format of selected image URL escape or unescape
  12. Convert the path of selected local image URL relative to absolute/absolute to relative
  13. Support multiple languages
  14. Support rename the new file name according to the rules.

Requirements

Need global install PicGo tool when upload image

For make the install package smaller, markdown-image-manage haven't package the Picgo inside ,and link the global PicGo

Step of install PicGo:

  1. Install node.js 12 and above
  2. Cli npm install picgo -g,使用方法见 https://picgo.github.io/PicGo-Core-Doc/ 相关的仓库为 https://github.com/PicGo/PicGo-Core

Picgo's introduction in https://picgo.github.io/PicGo-Core-Doc/ and https://github.com/PicGo/PicGo-Core

After install Picgo , you should set the PicBed's account, and could use cli picgo u /x/xxx.png for test upload images

Picgo support several PicBed and FTP server( PASV mode) by plugin.

Extension Settings

Get details in the extension, some of setting as below:

  1. removeFolder: The folder where image will move to when clean local image folder
  2. ~~hasBracket: Whether the image path include right bracket~~ replace ) to %29
  3. matchAngleBrackets: Whether match the image link in angle brackets
  4. imageSaveFolder: Local folder which the images will save to, support absolute or relative path. support <filename> and date format <YYYYMMDD> variable (dayjs)
  5. updateLink: Whether update the picture link in md file(Clean,Download,Upload,Move)
  6. skipSelectChange: Whether still update picture link when selection/position changed
  7. rename: Whether rename the image files(Download,Upload,Move,Copy)
  8. nameFormat: the format of rename rules, default is [D] , For details, see Renaming Rules
  9. remotePath: Which be added at beginning of PicBed path, support <filename> and date format <YYYYMMDD> variable (dayjs)
  10. clipboardPath: Clipboard image's path and name, support <filename> and date format <YYYYMMDD> variable (dayjs)
  11. urlFormatted: Whether escape image URL when insert local image

Renaming Rules

The rules are similar to TotalCommand

  1. [D] the default . The specific rule is a timestamp + a two - digit random number to ensure uniqueness.
  2. [N] represents the original file name.
  3. [N#-#] represents the character range of the original file name.
  4. [N1 - 2] means taking the first two letters of the file name.
  5. [N2 - 10] means starting from the second letter to the tenth letter of the file name.
  6. [N - 3] means taking the last three letters of the file name.
  7. [C] represents automatic counting, starting from 1 by default.
  8. [C0009] means the number has a length of 4 and starts counting from 9.
  9. To prevent duplication, the rule must contain either [D] or [C]. If either is missing, [C] will be automatically added at the end.
  10. The above rules can be freely combined. The following are examples:
  11. For the rule TEST-[C05], if the file name is "ABCDEF.jpg," etc., after modification, the file name will be TEST-05.jpg,TEST-06.jpg, ...
  12. For the rule [N1-3]-[C002], if the file name is "ABCDEF.jpg,", etc., after modification, the file names will be ABC-002.jpg, ABC-003.jpg, ...

Known Issues

None

Release Notes

Refer to CHANGELOG.md

Repository

https://github.com/pattazl/markdown-image-manage

https://gitee.com/pattazl/markdown-image-manage

the related npm cli tool : markdown-image-manage-npm

https://github.com/pattazl/markdown-image-manage-npm

https://gitee.com/pattazl/markdown-image-manage-npm

Enjoy!

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.