brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 286 forks source link

Taking a screenshot of dynamic html with images in html #201

Open affanazul opened 7 years ago

affanazul commented 7 years ago

Below is my code, I was unable to take screen shot with images img src attr. Could you guide me on this

var webshot = require('webshot'); var options = { siteType : "html", streamType : "jpeg", defaultWhiteBackground : true, quality : 100, windowSize : { width: 2000, height: 1000 },

};

var html = "";

webshot(html, "our-world.jpeg" , options ,(err)=>{ console.log("inside"); if(err){ return console.log(err); } console.log("Image Success!");

});