PptxGenJS icon indicating copy to clipboard operation
PptxGenJS copied to clipboard

addImage with not working with node version

Open stevedorke opened this issue 8 years ago • 1 comments

tried to run the node-example with the slide.addImage with an http link for the path:

slide.addImage({ path: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg", x: 1, y: 1, });

and got the following error: pptxgenjs ver: 2.3.0-beta.20180820 ERROR....: Unable to read media: "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" DETAILS..: Error: ENOENT: no such file or directory, open 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'

passing a relative path to a local image works, but passing an http link does not.

stevedorke avatar Aug 21 '18 20:08 stevedorke

Hi @stevedorke

Node encoding for remote images was the sole remaining feature for the new path features introduced recently.

The final code is checked in and this URL loads successfully now.

screen shot 2018-08-25 at 20 08 20

gitbrent avatar Aug 26 '18 01:08 gitbrent