Closed mbrevda closed 8 years ago
This was originally a feature but was then removed for some reason (probably harder to do than it seems). I do hope they bring it back, we had a great equivalent in Angular.
@mbrevda @mattaningram Thanks for the feedback! The previous implementation never really worked and was reverted pretty quickly. We never really used it internally so didn't have a need to focus on it but I had some time tonight and was able to implement. Passing fallbackImage
as an array should be available in 3.2.0
That was awesomely fast @conorhastings thanks for all your hard work!
Thanks! One more note: perhaps it would make sense to just pass the array as srcImage, with no need for a separate property for the fallback...
On Fri, Sep 2, 2016 at 5:29 AM Mattan Ingram notifications@github.com wrote:
That was awesomely fast @conorhastings https://github.com/conorhastings thanks for all your hard work!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/socialtables/react-image-fallback/issues/33#issuecomment-244267536, or mute the thread https://github.com/notifications/unsubscribe-auth/AAR4jDr6rjvmeRb4_1dnpG60J9gpV_ZYks5ql4n2gaJpZM4JxXxB .
@mbrevda I think that potentially I would like to support arrays for both, but don't neccesarily think we'll deprecate fallbackImage as some may prefer that api.
I've gone ahead and released my own lib which supports multiple fallbacks: https://www.npmjs.com/package/react-image
Thanks!
Would it be possible to convert
fallbackImage
to an array, so that we can have multiple fallbacks? In case the first is missing, try the second, etc...