vitaliy-bobrov / ionic-img-cache

Image caching for Ionic 1.x applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caching broken images

almothafar opened this issue · comments

Hello again :), I have an issue with my application with the big size images and caching them, simply when I have a big image and loading, the image cache sometimes catching it as empty image, or if it half loaded, for example, to reproduce the issue, try to load many images with 1MB of size and during this disconnect the data.

For me, I'm facing this with caching background images.

@almothafar

  1. Try to increase storage limit, see https://github.com/vitaliy-bobrov/ionic-img-cache#quota
  2. It seems that background images encoded to base64, it this case image size increases
  3. Try to minify your images with imagemin or other tool to reduce its size.

@vitaliy-bobrov

Hi, thanks for reply, I tried to use 50MB and 100MB not really helpful, and I use direct URL that server the image file, I mean it returns as an image not base64, the CSS code is clearly url('http://domain.com/api/img/123.png')

Finally, I do already reduce images in my backend with java library, I know reducing the size could reduce that chance to this issue to happen, but not avoid it, i.e: a user has slow speed connection and image size like 200KB which is already reduced, also I have png images with really big size after reducing the sizes, like 800KB+.

I have many images and meant to be in HD resolution for big devices such as the tabs, where my limitation with reducing image sizes stops.

Edit: also, as the title here, the problem will be easy just to see if the cached image is the same as the original one somehow? maybe could be imgcache.js issue not yours?

have the same problem..

same problem here , broken image. :(

It seems that issue is related to https://github.com/chrisben/imgcache.js module,
ionic-img-cache is only ionic/angular wrapper for it.