Plans from $25/month
This lesson is for members. Join us?
Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!
Generate Image File Previews in Vue.js
In this lesson, learn how to display a preview of an uploaded image. There are a couple different approaches for this:
- Upload the file to your server and then use the returned url as the
src
attribute on animg
element - Use the
URL.createObjectURL
function on the imageFile
objects to get a string for use on thesrc
attribute of animg
element. (This approach can be done BEFORE upload)
Links