Add fallback image

This commit is contained in:
Sean Boult 2023-03-24 20:06:57 -05:00
parent 76d65f14ff
commit 168387237e
3 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View file

@ -56,7 +56,6 @@ typings/
.env*
.cache/
public
# Mac files
.DS_Store

BIN
public/default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

View file

@ -20,6 +20,10 @@ export default function Person({ person }) {
height="50"
src={img}
alt={person.name}
onError={({ currentTarget }) => {
currentTarget.onerror = null; // prevents looping
currentTarget.src = "/default.png";
}}
loading="lazy"
/>
<h3>