MatteoGabriele / vue-progressive-image

Vue progressive image loading plugin
https://matteo-gabriele.gitbook.io/vue-progressive-image/
MIT License
721 stars 43 forks source link

Suggestion: Read image from File object #49

Closed mikerockett closed 6 years ago

mikerockett commented 6 years ago

I'm using this component as part of an editing page where a feature image may be updated. The src is bound to feature_image in state, and when the user selects a new image, this piece of state changes from a string containing the URL of the image, to the File object that will uploaded on save.

My suggestion is to have the component detect if the src is an instance of a file and, if so, read its contents and display the image.

Would this be possible?

Thanks for the great component, works well in my project. 👍

MatteoGabriele commented 6 years ago

Hi @mikerockett I'm sorry but I don't think that this will be a feature that I will implement: it's a very edge-case use, very specific to your needs. I will stick to support just plain images as the normal img tag does, with few extras

thanks for your suggestion tho

mikerockett commented 6 years ago

No problem at all, I have it working now. :)