diff --git a/src/providers/image-loader.ts b/src/providers/image-loader.ts index 2da05db..e8cf12b 100644 --- a/src/providers/image-loader.ts +++ b/src/providers/image-loader.ts @@ -216,9 +216,10 @@ export class ImageLoader { if (this.shouldIndex) { this.addFileToIndex(file).then(this.maintainCacheSize.bind(this)); } - - currentItem.resolve(localPath); - done(); + this.getCachedImagePath(currentItem.imageUrl).then((localUrl) => { + currentItem.resolve(localUrl); + done(); + }); }) .catch((e) => { currentItem.reject();