Loading from url
measwel opened this issue · comments
Thank you for making the excellent vue picture input. My question is: how would I load the image not by click or drop, but from a given url? What function would I have to use for that?
you mean prefill?
- prefill: (image url or File object, optional) use this to specify the path to a default image (or a File object) to prefill the input with. Default value: empty.
hmmm I mean to programatically load an image from url as if the user had clicked on the input and chose a file.
Yes, prefill is your friend.
Remember that if it's not an URL on the same domain, you'll need to add a CORS policy and specify the allowed domains: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS