Skip to content

fix: reduced animation causes asset viewer to not render high res version#29815

Open
alextran1502 wants to merge 1 commit into
mainfrom
fix-29727
Open

fix: reduced animation causes asset viewer to not render high res version#29815
alextran1502 wants to merge 1 commit into
mainfrom
fix-29727

Conversation

@alextran1502

@alextran1502 alextran1502 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fix #29727

Changes from flutter/flutter#176492 "Image GIF pausing" when the OS reports reduced motion (MediaQuery.disableAnimations, Android's "Remove animations" accessibility setting or animator duration scale 0). The Image widget now stops listening to its image stream after the first frame.

@immich-push-o-matic

Copy link
Copy Markdown

📱 Android release APK (universal)e4926a2039564f73ebf056a5ffeadac9e5c17dab

Download: https://github.com/immich-app/immich/actions/runs/29119698478/artifacts/8238154914

QR code QR code

Installs as a separate app (applicationId app.alextran.immich.pr29815), so it coexists with the Play Store version and any other PR builds.

@alextran1502 alextran1502 marked this pull request as ready for review July 10, 2026 20:04

@mertalev mertalev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this. Arguably, this should be solved with an upstream issue instead.

/// "Remove animations" accessibility setting or an animator duration scale of
/// zero), which would freeze these images at their low-res first frame.
/// Photos are not animations, so clear the flag for this subtree.
class ProgressiveImageGuard extends StatelessWidget {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very hacky. Can we extend Image to override its behavior instead? It also seems inappropriate to disable this considering images can be animated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I don't like wrapping this with every image widget

@alextran1502 alextran1502 Jul 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although I don't think we can extend the Image class for this, since the property is set in the internal private state of the Image class https://github.com/flutter/flutter/blame/041dc6a9a2d93d3ef9bc2994fd08545903207aee/packages/flutter/lib/src/widgets/image.dart#L1147

@wassupluke

Copy link
Copy Markdown

Fwiw, this apk build did resolve the issue on my brief testing of it just now.

@mertalev

Copy link
Copy Markdown
Member

Another option would be to check MediaQuery.disableAnimations in the image provider and skip progressive loading in this case, only displaying the final image.

@LeLunZ

LeLunZ commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Another option would be to check MediaQuery.disableAnimations in the image provider and skip progressive loading in this case, only displaying the final image.

Also thought about that, but if we would do that, we would also need to stop providing the initial image, or? So if users has "show original" turned on or is on a slow internet connection, we would show nothing till the image has loaded which could take some time. This could really be a downer for user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Low resolution photos in memories and when first viewing an image on Android

4 participants