Skip to content

Commit

Permalink
image size가 viewport에 맞게 변경되도록 수정
Browse files Browse the repository at this point in the history
 image size가 viewport에 맞게 변경되도록 수정
  • Loading branch information
seoko97 authored May 2, 2024
2 parents 609d5d9 + 8337339 commit 13ac081
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const nextConfig = {
images: {
domains: ["image.toast.com"],
minimumCacheTTL: 86400,
deviceSizes: [480, 768, 980],
imageSizes: [96, 128, 256, 384, 480],
deviceSizes: [640, 768, 980, 1080, 1200, 1920],
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Markdown/overrides/img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const img = (props: ImageProps) => {
{...rest}
width={1000}
height={1000}
className="mx-auto my-0 h-auto w-auto max-w-full rounded-md shadow-sm"
className="mx-auto my-0 h-auto w-auto max-w-full rounded-md shadow-sm sm:w-full"
/>
{alt && <p className="mt-2 text-center text-sm text-gray-400">{alt}</p>}
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/core/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Image = ({ width, height, className = "", ...rest }: ImageProps) => {
style={{ objectFit: "cover" }}
className={`relative h-auto max-w-full ${className}`}
quality={100}
sizes="(max-width: 980px) 980px, 768px, 50vw, 33vw"
sizes="(max-width: 980px) 100vw, 980px, 50vw"
width={rest.fill ? undefined : width ?? 1000}
height={rest.fill ? undefined : height ?? 1000}
{...rest}
Expand Down

0 comments on commit 13ac081

Please sign in to comment.