Skip to content

Commit

Permalink
Attempt to fix image loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiontornado committed Jun 22, 2024
1 parent c8ca46c commit 36924c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/team/ExecCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ const ExecCard = ({ data, colour }: ExecCardProps) => {
<p className={styles["person-text"]}>{description}</p>
</>
)}
<Image alt={name} src={image} className={styles["card-img-top"]} />
<Image
alt={name}
src={image}
sizes="(max-width: 767px) 100vw, 33vw"
quality="0.5"
className={styles["card-img-top"]}
/>
</div>
</div>
<div className="card-body text-center pt-2 pb-4">
Expand Down
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ const nextConfig = {
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
images: {
// Not a permanent solution - from ChatGPT, trying to address images not loading
// see: https://nextjs.org/docs/pages/api-reference/components/image#devicesizes
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
};

module.exports = nextConfig;

0 comments on commit 36924c6

Please sign in to comment.