You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Placeholder widget for images that haven't yet loaded #157
Comment by abarth Tuesday Sep 08, 2015 at 16:18 GMT
Sky will support screen readers. We'll need to think about what we want to have happen when network images fail to load. We probably want a callback at minimum so that developers can choose to do whatever they want.
Comment by Hixie Tuesday Oct 13, 2015 at 19:17 GMT
Why would images fail to load? If they're core app assets, presumably they come with the app, and basically can't fail (unless something catastrophic is going on). If they're network images like a user's album photos or whatnot, it's not clear that the right behaviour is to display text instead.
Comment by afandria Tuesday Oct 13, 2015 at 19:24 GMT
I don't know why the images are failing to load, but they are. I even specified them in my app's manifest.yaml. (I haven't updated recently, but I am on 0.0.53 and the images are still lost occasionally. IIRC, there was a fix for image decoders that went in just after that version.)
Otherwise, my use case is the same as the web's. When an image that is pulled from the internet fails to load, I want alt text to show up in its place. That would require NetworkImage to accept the alt text as a property. It doesn't have to be the only fallback, but I think it's one of the common ones.
An alternative would be to allow a placeholder Widget until the image loads, since that will satisfy many use cases.
Comment by Hixie Tuesday Oct 13, 2015 at 19:34 GMT
If you're getting lost images on the latest trunk, please do file a bug for that. We shouldn't be losing images.
The Web's use case for alternative text is that sometimes people disable images, sometimes people use text-only browsers, and sometimes they write documents where they use images in place of text, and when using screen readers, the image should be in-place replaced by text. None of these apply to flutter. (Also, on the Web, we've learnt that authors are horrifically bad at writing good alternative text, so even if those were the use cases, we should find better solutions.)
Having a placeholder widget for images that are not yet loaded is interesting. A big concern with image loading in general is that because layout depends on image dimensions, as images are loading the layout can change. This is bad for performance and results in really ugly UI reminiscent of the way the Web jumps around when pages are loading. I'd really like us to find a way to avoid that.
This now only applies to images that are coming from the network, and thus not part of the app, since images in the assets file will be quick to load. Showing network images is probably something that the developer would wrap with loading behaviour anyway, so I'm not sure we really need to do anything explicit here.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
FlutterIssues commentedon Nov 9, 2015
Tuesday Sep 08, 2015 at 16:18 GMT
Sky will support screen readers. We'll need to think about what we want to have happen when network images fail to load. We probably want a callback at minimum so that developers can choose to do whatever they want.
FlutterIssues commentedon Nov 9, 2015
Tuesday Oct 13, 2015 at 19:17 GMT
Why would images fail to load? If they're core app assets, presumably they come with the app, and basically can't fail (unless something catastrophic is going on). If they're network images like a user's album photos or whatnot, it's not clear that the right behaviour is to display text instead.
(This is orthogonal to accessibility concerns.)
Do you have a concrete case in mind?
FlutterIssues commentedon Nov 9, 2015
Tuesday Oct 13, 2015 at 19:24 GMT
I don't know why the images are failing to load, but they are. I even specified them in my app's
manifest.yaml. (I haven't updated recently, but I am on 0.0.53 and the images are still lost occasionally. IIRC, there was a fix for image decoders that went in just after that version.)Otherwise, my use case is the same as the web's. When an image that is pulled from the internet fails to load, I want alt text to show up in its place. That would require NetworkImage to accept the alt text as a property. It doesn't have to be the only fallback, but I think it's one of the common ones.
An alternative would be to allow a placeholder Widget until the image loads, since that will satisfy many use cases.
FlutterIssues commentedon Nov 9, 2015
Tuesday Oct 13, 2015 at 19:34 GMT
If you're getting lost images on the latest trunk, please do file a bug for that. We shouldn't be losing images.
The Web's use case for alternative text is that sometimes people disable images, sometimes people use text-only browsers, and sometimes they write documents where they use images in place of text, and when using screen readers, the image should be in-place replaced by text. None of these apply to flutter. (Also, on the Web, we've learnt that authors are horrifically bad at writing good alternative text, so even if those were the use cases, we should find better solutions.)
Having a placeholder widget for images that are not yet loaded is interesting. A big concern with image loading in general is that because layout depends on image dimensions, as images are loading the layout can change. This is bad for performance and results in really ugly UI reminiscent of the way the Web jumps around when pages are loading. I'd really like us to find a way to avoid that.
[-]Alt Text for Images that do not load[/-][+]Placeholder widget for images that haven't yet loaded[/+]Hixie commentedon Feb 23, 2016
This now only applies to images that are coming from the network, and thus not part of the app, since images in the assets file will be quick to load. Showing network images is probably something that the developer would wrap with loading behaviour anyway, so I'm not sure we really need to do anything explicit here.
sethladd commentedon Sep 20, 2016
Going to close because we don't have plans to take action, but please reopen if we need to.
Remove explicit whitelists for GN check. All our targets pass checks. (…
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.