Skip to content

Commit

Permalink
Using optimized image directive of angular (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Egli <marco_egli@hotmail.com>
  • Loading branch information
np-complete-graph and megli authored Feb 23, 2024
1 parent da39e77 commit 697ad19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { registerLocaleData } from '@angular/common';
import { NgOptimizedImage, registerLocaleData } from '@angular/common';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import localeDeCh from '@angular/common/locales/de-CH';
import { LOCALE_ID, NgModule, isDevMode } from '@angular/core';
Expand Down Expand Up @@ -187,6 +187,7 @@ export function MSALGuardConfigFactory(): MsalGuardConfiguration {
MatButtonModule,
MatInputModule,
MatProgressBarModule,
NgOptimizedImage,
],
providers: [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="relative">
<img
[src]="card.image_url"
[ngSrc]="card.image_url"
[height]="400"
[width]="400"
alt="{{ card.name }}"
class="w-full aspect-square object-cover"
[class.grayscale]="!card.quantity"
Expand Down

0 comments on commit 697ad19

Please sign in to comment.