var qr = require('qr-image');
var qr_png = qr.image('I love QR!', { type: 'png', size: 10 });
qr_png.pipe(require('fs').createWriteStream('i_love_qr.png'));
You can't directly set size of result image because it's depend on length of text and error correction level.
https://github.com/alexeyten/qr-image#options There is
size
option which set width and height of one square of image.You can't directly set size of result image because it's depend on length of text and error correction level.