Load Retina Images from img tag
Last updated 6 years ago
First import it to your app module or any submodule as you wish
import { SharedModule } from './@pages/components/shared.module'; @NgModule({ imports: [SharedModule,...] }) export class AppModule(){}
Place "pgRetina" in any image / img tag
<img src="assets/img/profiles/avatar.jpg" alt="" pgRetina src1x="assets/img/profiles/avatar.jpg" src2x="assets/img/profiles/avatar_small2x.jpg" width="32" height="32">
parameter
Instructions
Types of
Defaults
src1x
Load original image path
string
null
src2x
Load Retina image path