Open sebastienb opened 2 years ago
The issue is with the svg file that is being created. I did the following to solve the issue.
const qrCodeSVG = qrContainer?.querySelector("svg");
if (qrCodeSVG) {
qrCodeSVG.setAttribute("viewBox", "0 0 500 500");
qrCodeSVG.setAttribute("width", "100%");
qrCodeSVG.setAttribute("height", "100%");
}
When using the imageOptions Image size, the images resize but get stretched. to reproduce, generate a qr code with a rectangular image then set a size of say .5. The qr image will shrink but the aspect ration of the rectangle will be different than the original rectangle.
Here are the options I'm using: