Skip to content

[Google3 Bug]: ImageStream & ImageProvider provide no way to pause GIF animations #175516

@evantea

Description

@evantea

Related: #130976

Help us understand the severity of this issue

  • causing severe production issues e.g. malfunctions or data loss
  • blocking next binary release
  • blocking a client feature launch within a quarter
  • nice-to-have but does not block a launch within the next quarter

Steps to reproduce

  1. Load a GIF asset into ImageProvider/ImageStream via CachedNetworkImage.

Expected results

Either one of the following:

  1. The ImageProvider/ImageStream library provides a way to disable any animation of the provided image.
  2. MediaQuery.of(context).disableAnimations is respected by the ImageProvider/ImageStream library by default.

Actual results

  1. Neither ImageProvider/ImageStream provide a way to disable animation of an image
  2. MediaQuery.of(context).disableAnimations is not respected by the ImageProvider/ImageStream library.

Code sample

Code sample

yaml:

dependencies:
  flutter:
    sdk: flutter
  cached_network_image: ^3.3.1 # Use the latest version

Dart File:

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'GIF Loading with CachedNetworkImage',
      home: Scaffold(
        appBar: AppBar(title: const Text('Cached GIF')),
        body: Center(
          child: CachedNetworkImage(
            imageUrl:
                'https://media1.tenor.com/m/Ps_NnXFTyRYAAAAC/send-link-send.gif',
            placeholder: (context, url) => const CircularProgressIndicator(),
            errorWidget: (context, url, error) => const Icon(Icons.error),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: animationAnimation APIsa: imagesLoading, displaying, rendering imagesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttercustomer: chalk (g3)customer: googleVarious Google teamsframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions