Using qrcode.js to generate a QR code, what should I do if I want to get the string of src (data:image/png) in the img tag of the QR code?

1, recently use qrcode.js to generate the QR code, and then get the src (data:image/png;base64) in the generated QR code img.
process is: string--> (through qrcode)--> QR code--> src
2 in img. The purpose you want:
is there a way to skip the generation of QR code and directly generate a string in data:image/png?

I"m sorry for the awkwardness of the language.

Mar.22,2021

the "that data:image/png string" in your statement is actually a picture, but a picture that exists in base64 encoding.

your goal now is to get a picture without generating a picture. I know someone who can achieve-The fking God!


I understand that you want to get the address of the QR code?
method: scan the code through Wechat-> Click to open or copy the link with the browser.

Menu