-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AVATAR] Reload on error #2892
Comments
oh wait i am stupid... that callback doesn't fire multiple times since the status doesn't change again after it's error... yea solved it in user-code |
Actually it didn't work since you unmount the image on error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request
Overview
I'd like to retry loading the image on error. I tried something using the
onLoadingStatusChanged
but didn't manage to get it working.For context, this is my current hacky playground:
but the retrying is only logged once, and the ref is always null:
Is this possible and I'm just dumb and can't figure it out? Could this be a built in prop perhaps?
Examples in other libraries
N/A
Who does this impact? Who is this for?
The usecase is for when updating a profile picture, sometimes it takes a short while for the image to have the correct metadata on the server to be rendered properly by the browser. This causes the image to error immediately after being uploaded. I'd like to just retry loading the image a couple times (like retry it 3 times in 100ms intervals).
Additional context
The text was updated successfully, but these errors were encountered: