Skip to content

Commit

Permalink
Merge pull request #171 from mismith0227/feature/lighthouse
Browse files Browse the repository at this point in the history
画像サイズ修正
  • Loading branch information
mismith0227 authored Jul 2, 2023
2 parents 179b673 + 9e14a1e commit 10ad986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/pages/HomeContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const HomeContainer = ({ data }: Props) => {
<div key={item.id} className="keen-slider__slide">
<StyledImage
key={item.id}
src={`${item.image.url}?fm=webp`}
src={`${item.image.url}?fit=clip&w=1400&h=1400?fm=webp`}
alt={item.title || ''}
width={item.image.width}
height={item.image.height}
Expand Down
5 changes: 3 additions & 2 deletions components/pages/PhotoContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const PhotoContainer = ({ data }: Props) => {
columns={{ xs: 1, sm: 2, md: 3 }}
spacing={{ xs: 1, sm: 2, md: 3 }}
>
{data.map((item) => (
{data.map((item, index) => (
<ImageWrap
key={item.id}
onClick={() =>
Expand All @@ -78,10 +78,11 @@ export const PhotoContainer = ({ data }: Props) => {
}
>
<StyledImage
src={`${item.image.url}?w=400?fm=webp`}
src={`${item.image.url}?fit=clip&w=800&h=800?fm=webp`}
alt={item.title || ''}
width={item.image.width}
height={item.image.height}
loading={index > 6 ? 'lazy' : 'eager'}
/>
</ImageWrap>
))}
Expand Down

1 comment on commit 10ad986

@vercel
Copy link

@vercel vercel bot commented on 10ad986 Jul 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.