Open irjayjay opened 1 year ago
🐛 Bug Report
When adding a
memCacheWidth
ormemCacheHeight
, the cached version of the image doesn't get passed to theimageBuilder
, so the image stays its original size.When using
debugInvertOversizedImages = true;
the image is clearly still too large for its container. Removing theimageBuilder
fixes this error.Expected behavior
Image rendered through the imageBuilder should be lower resolution or smaller size.
Reproduction steps
Run the following with an image:
CachedNetworkImage( imageUrl: imageUrl.toString(), memCacheWidth: 50, imageBuilder: (context, imageProvider) { return Container( width: double.infinity, height: 150, decoration: BoxDecoration( image: DecorationImage( image: imageProvider, fit: BoxFit.cover, ), ), ); }, ),
Configuration
As above.
Version: 3.2.0
Platform:
- [ ] 📱 iOS
- [x] 🤖 Android
Hi bro ! You can try update version to cached_network_image: ^3.2.2
Yes, it's because the image provider we are receiving is not applying the ResizeImage. I believe the implementation of imageBuilder on this package needs to be refactored, to make sure that we will receive the image based on the CachedNetworkImage settings
🐛 Bug Report
When adding a
memCacheWidth
ormemCacheHeight
, the cached version of the image doesn't get passed to theimageBuilder
, so the image stays its original size.When using
debugInvertOversizedImages = true;
the image is clearly still too large for its container. Removing theimageBuilder
fixes this error.Expected behavior
Image rendered through the imageBuilder should be lower resolution or smaller size.
Reproduction steps
Run the following with an image:
Configuration
As above.
Version: 3.2.0
Platform: