vue-croppa
vue-croppa copied to clipboard
[QUESTION] - Change Image Dynamically
Hi @zhanziyang, just wondering how to implement changing of initial image dynamically? Just like when you click a button the initial image will update, so on. This is working pen describing my problem, kindly check https://codepen.io/smplyjr/pen/LmENoM?editors=1010
Thanks 👍
The way you did it is right. The only problem is the image link does not support CORS.
You see, the there is no Access-Control-Allow-Origin: *
in the response headers, which means the image can not be used in the situation. Try changing the link to 'https://picsum.photos/300/300?1524150929365'
in the pen and you will find it works.
Related issue: #95 More about cross origin images: https://zhanziyang.github.io/vue-croppa/#/help
Yup, I think thats the issue. My mistake not looking over it on the docs. Thanks mate! Another thing, is it normal when croppa doesnt return its promiseBlob when the image was set via initial image? (not the normal upload one)
@smplyjr It's not normal. When do you call generateBlob? Can you provide demo that reproduce?