We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30ee4fc commit 54c05beCopy full SHA for 54c05be
src/plugins/transformer/path.ts
@@ -10,7 +10,14 @@ const handle = async (ctx: IPicGo): Promise<IPicGo> => {
10
const results: IImgInfo[] = ctx.output
11
await Promise.all(ctx.input.map(async (item: string, index: number) => {
12
let info: IPathTransformedImgInfo
13
- if (isUrl(item)) {
+ if (Buffer.isBuffer(item)) {
14
+ info = {
15
+ success: true,
16
+ buffer: item,
17
+ fileName: 'temporary.png',
18
+ extname: '.png'
19
+ }
20
+ } else if (isUrl(item)) {
21
info = await getURLFile(item, ctx)
22
} else {
23
info = await getFSFile(item)
0 commit comments