Skip to content

Commit ba84f86

Browse files
committed
feat: 이미지 사이즈 지정
1 parent 2b79bc1 commit ba84f86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/ImageKitImg.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import defaultImage from '@assets/images/default.png';
2+
23
interface ImageKitImgProps {
34
src: string; // Spotify 이미지 URL
45
width: number;
@@ -20,6 +21,8 @@ export default function ImageKitImg({
2021
<img
2122
className={className}
2223
src={`https://ik.imagekit.io/${import.meta.env.VITE_IMAGEKIT_ID}/${imagePath}?tr=w-${width},h-${height}`}
24+
width={width}
25+
height={height}
2326
onError={(e) => {
2427
const target = e.target as HTMLImageElement;
2528
target.onerror = null; // 무한 루프 방지

0 commit comments

Comments
 (0)