Baseflow / Baseflow/flutter_cached_network_image

ImageBuilder fails to render high-resolution images with Impeller enabled

Open
#1,010 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.6k
Forks
731
Avg merge
3d 9h
Merged PRs (30d)
1

Description

## 🐛 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
```dart
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
```log
Exception: Could not create Impeller texture.
```

### Configuration
**Flutter version:** 3.27 above. My project used 3.29.3

**Version:** 3.3.0

**Platform:**
- [X] :iphone: iOS

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.