@@ -8,17 +8,17 @@ export async function GET(request: NextRequest) {
88 const { searchParams } = new URL ( request . url ) ;
99
1010 const src = searchParams . get ( 'src' ) ;
11- const width = searchParams . get ( 'width' ) ;
12- const height = searchParams . get ( 'height' ) ;
11+ // const width = searchParams.get('width');
12+ // const height = searchParams.get('height');
1313
1414 if ( ! src || typeof src !== 'string' ) {
1515 return new NextResponse ( 'Missing or invalid "src" query parameter' , {
1616 status : 400 ,
1717 } ) ;
1818 }
1919
20- const widthInt = width ? parseInt ( width as string , 10 ) : null ;
21- const heightInt = height ? parseInt ( height as string , 10 ) : null ;
20+ // const widthInt = width ? parseInt(width as string, 10) : null;
21+ // const heightInt = height ? parseInt(height as string, 10) : null;
2222 const isGif = src . endsWith ( '.gif' ) ;
2323
2424 const getImageBuffer = async ( ) => {
@@ -50,10 +50,10 @@ export async function GET(request: NextRequest) {
5050 ? sharp ( imageBuffer , { animated : true } ) . gif ( )
5151 : sharp ( imageBuffer ) . webp ( ) ;
5252
53- // 이미지 리사이징
54- if ( widthInt || heightInt ) {
55- image . resize ( widthInt , heightInt ) ;
56- }
53+ // // 이미지 리사이징
54+ // if (widthInt || heightInt) {
55+ // image.resize(widthInt, heightInt);
56+ // }
5757
5858 const optimizedImageBuffer = await image . toBuffer ( ) ;
5959
0 commit comments