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

how to save this image or view on any img tag #2

Open
bitfumes opened this issue Dec 5, 2017 · 2 comments
Open

how to save this image or view on any img tag #2

bitfumes opened this issue Dec 5, 2017 · 2 comments

Comments

@bitfumes
Copy link

bitfumes commented Dec 5, 2017

We are getting var = img on saveClicked method, but it is a "HTMLCanvasElement"
How do we use this or save this or send .

@dawood
Copy link
Contributor

dawood commented Dec 6, 2017

you could do something like this

let img  = self.$refs.vueavatar.getImageScaled()
let imageUrl = img.toDataURL()

you can then use imageUrl which contains base64 data for the image selected

@microhubdev
Copy link

I need to use this on a user's profile page, to display the image the user uploaded when registering. How do I set the img source to the path previously saved?

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