Skip to content

Commit a83f143

Browse files
committed
feat(image-loader): add preload method
closes #16
1 parent 365b1d5 commit a83f143

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/providers/image-loader.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ export class ImageLoader {
5252
}
5353
}
5454

55+
/**
56+
* Preload an image
57+
* @param imageUrl {string} Image URL
58+
* @returns {Promise<string>} returns a promise that resolves with the cached image URL
59+
*/
60+
preload(imageUrl: string): Promise<string> {
61+
return this.getImagePath(imageUrl);
62+
}
63+
5564
/**
5665
* Clears the cache
5766
*/

0 commit comments

Comments
 (0)