Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image box is not working with SVG #51

Open
acki opened this issue Sep 27, 2020 · 1 comment
Open

Image box is not working with SVG #51

acki opened this issue Sep 27, 2020 · 1 comment

Comments

@acki
Copy link

acki commented Sep 27, 2020

Hi

The image box option is not working with an img element displaying a SVG.
Can you please fix this?

Thanks,
Christoph

@AbyssDeep
Copy link

This work for me.

        var img_buffer = new Image();
        img_buffer.src = '/url-to-svgImage.svg';
        img_buffer.onload = function() {
            jQuery('#qrCode').qrcode({
                render: 'canvas',
                mode: 4,
                mSize: 0.3,
                mPosX: 0.5,
                mPosY: 0.5,
                image: img_buffer,
                text: "text",
            });
        };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants