mushanshitiancai / vscode-paste-image

paste image from clipboard to markdown/asciidoc directly!
MIT License
424 stars 129 forks source link

Could you add one new config item for image format, png or jpeg? #81

Open justfouw opened 3 years ago

justfouw commented 3 years ago

great work in advance.

Possiblely, png is a little bigger for image. Should we use JPEG formation?

I read the code, in src/extention.ts:: line 206~210.

....
// image file name
let imageFileName = "";
 if (!selectText) {
       imageFileName = this.namePrefixConfig + moment().format(this.defaultNameConfig) + this.nameSuffixConfig + ".png";
  } else {
       imageFileName = this.namePrefixConfig + selectText + this.nameSuffixConfig + ".png";
   }
....

Here, png format is specified manually. Can we use JPEG?

I dont know how to build this code to one installable plugin.

RobertAlbus commented 8 months ago

Big +1 on this request from me