Skip to content

Commit

Permalink
perf(images): reduce image sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Dec 27, 2023
1 parent ffab821 commit f15170f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/home/integrations/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export function Integrations() {
<div className="flex w-full" style={{ aspectRatio: "1/1" }}>
<Image
src={integrationsLight.src}
width={1224}
height={1224}
width={544}
height={544}
style={{
width: "100%",
height: "auto",
Expand All @@ -51,8 +51,8 @@ export function Integrations() {
/>
<Image
src={integrationsDark.src}
width={1224}
height={1224}
width={544}
height={544}
style={{
width: "100%",
height: "auto",
Expand Down
2 changes: 1 addition & 1 deletion components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const MainImage = ({
{...props}
priority
fill
sizes="(max-width: 1024px) 100vw, 50vw"
sizes="(max-width: 900px) 100vw, 832px"
alt="Staircase / eye in library — Photo by Petri Heiskanen"
style={{
objectFit: "cover",
Expand Down
6 changes: 5 additions & 1 deletion components/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export const PostCardImage = ({
<Image
{...props}
fill
sizes="(max-width: 1024px) 100vw, 50vw"
sizes={
extended
? "(max-width: 768px) 100vw, 1100px"
: "(max-width: 768px) 100vw, 510px"
}
priority={Boolean(extended)}
alt={alt}
style={{
Expand Down

0 comments on commit f15170f

Please sign in to comment.