Skip to content

ImageBuilder fails to render high-resolution images with Impeller enabled #1010

@developer-nesamani

Description

@developer-nesamani

🐛 Bug Report

When using ResizeImage inside the imageBuilder of cached_network_image, the image fails to render properly when Impeller is enabled.

This works fine with a normal Image widget and ResizeImage, but combining it with cached_network_image + imageBuilder causes unexpected rendering behaviour (or no image at all).

The issue becomes more noticeable when rendering multiple high-resolution images (e.g., 5000x6000 or higher) on the same screen — such as inside a scrollable list (ListView.builder).

Expected behaviour

  • ResizeImage should render high-resolution images properly inside CachedNetworkImage’s imageBuilder, regardless of whether Impeller is enabled.
  • The behavior should be consistent with Image.network + ResizeImage.

Reproduction steps

ListView.builder(
  itemCount: imageUrls.length,
  itemBuilder: (context, index) {
    return CachedNetworkImage(
      imageUrl: imageUrls[index],
      imageBuilder: (context, imageProvider) {
        return Image(
          image: ResizeImage(
            imageProvider,
            width: 300,
            height: 300,
          ),
        );
      },
    );
  },
);
  • Use image URLs with dimensions 5000x6000 or more.
  • Enable Impeller (flutter run --enable-impeller) or use Flutter version above 3.27 with the default impeller.
  • Observe: images may fail to render, appear blank, or behave inconsistently.

Exception / Logs

Exception: Could not create Impeller texture.

Configuration

Flutter version: 3.27 above. My project used 3.29.3

Version: 3.3.0

Platform:

  • 📱 iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions