This library will stored image base64 data to windows object and <img/>
element will be load image data from windows object.
npm install --save ngx-image-cache
Need to import NgxImageCacheModule
in AppModule
.
import { NgxImageCacheModule } from 'ngx-image-cache';
@NgModule({
...
imports: [
...
NgxImageCacheModule
...
],
...
bootstrap: [AppComponent]
})
export class AppModule { }
In your html component. Just call the library component like below.
<ngx-image-cache
src="/your/image/url.png"></ngx-image-cache>
For the next development image data will be stored to indexDB instead windows object (need to do RnD for that).
MIT