Flutter_cached_network_image: Request to add cacheHeight and cacheWidth params

Created on 9 Nov 2019  路  12Comments  路  Source: Baseflow/flutter_cached_network_image

Is there an ability to add cacheHeight and cacheWidth params in order to control imageCache? I have problems with running an app containing about 60 pictures on devices with RAM less than 2 GB, so I need to optimize caching images. I guess, it would be useful for many developers

enhancement

Most helpful comment

I think it is better to already have the images of smaller size when getting them from the server as that limits the use of data, but it is a good feature request.

All 12 comments

Hi. @renefloor When will see this feature added to cached network image. Currently
we can't sheep our app to production because of crashes from Cached_Network_image which may be solved by adding of cacheHeightand cacheWidthparameters.

Your help is highly appreciated.
Thanks.

I think it is better to already have the images of smaller size when getting them from the server as that limits the use of data, but it is a good feature request.

@DyaryRaoof @alectogeek I made a small port of this library which respects parent container sizes while storing and loading to/from cache. Here it is https://pub.dev/packages/optimized_cached_image.

@humblerookie Some of the features you added are also already being added to flutter_cache_manager, such as saving a file using a streamed http response. I'm open to PR's if you want to add things to this library. Currently I'm focussed on improving the cache manager with tests and requested features (for example progress is next on my list).

@renefloor Is there some way we could collaborate more effectively? like over chat. I had a couple of queries.

@humblerookie I'm often online on fluttercommunity.slack.com

For memory cache I added memCacheHeight and width in 2.3.0-beta

@renefloor Just updated to use beta version 2.3.0-beta, don't i don't have access to the properties?

@danielappelgren0 Maybe try pub upgrade?
I just added version 2.3.0-beta in a test project and I do have the properties:

CachedNetworkImage(memCacheHeight: 200, memCacheWidth: 200,),

@renefloor Just did that as well and it works, not sure why it's not working in my app :)

Edit:
Restart of Code did the job 馃憤

@renefloor is there somewhere i can reach you, which is not Github ? i have some questions regarding the plugin?

@danielappelgren0 I guess easiest is on the community slack: fluttercommunity.slack.com

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregko picture gregko  路  6Comments

tolotrasamuel picture tolotrasamuel  路  6Comments

ivk1800 picture ivk1800  路  7Comments

anass-naoushi picture anass-naoushi  路  5Comments

nashfive picture nashfive  路  5Comments