Pages UI
Search…
Retina Image
Load Retina Images from img tag

Importing

First import it to your app module or any submodule as you wish
1
import { SharedModule } from './@pages/components/shared.module';
2
@NgModule({
3
imports: [SharedModule,...]
4
})
5
export class AppModule(){}
Copied!

Usage

Place "pgRetina" in any image / img tag
HTML
1
<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">
Copied!

API

parameter
Instructions
Types of
Defaults
src1x
Load original image path
string
null
src2x
Load Retina image path
string
null
Copy link