이미지는 웹사이트를 느리게 만드는 가장 흔한 원인 중 하나이며, 동시에 가장 쉽게 개선할 수 있는 부분입니다.

NanoImage는 브라우저 기반 이미지 도구로 시작했습니다. 이제 NanoImage CLI는 같은 작업 흐름을 터미널로 가져옵니다.

bash
nanoimage compress ./images --quality 75 --output ./compressed

개발자, 콘텐츠 팀, SEO 팀, 그리고 브라우저를 열지 않고 이미지를 최적화하고 싶은 사람들을 위한 도구입니다.

왜 CLI를 만들었나요

단일 이미지는 웹 도구가 편리합니다. 하지만 폴더 단위 최적화, WebP 변환, EXIF 제거, CI/CD 자동화에는 CLI가 더 잘 맞습니다.

할 수 있는 작업

이미지 압축

bash
nanoimage compress photo.jpg --quality 75 --output ./compressed

이미지 크기 조정

bash
nanoimage resize hero.jpg --width 1600 --output ./resized

포맷 변환

bash
nanoimage convert logo.png --to jpg --background white --output ./converted

WebP 변환

bash
nanoimage webp hero.jpg --quality 80 --output ./webp

EXIF 제거

bash
nanoimage remove-exif photo.jpg --output ./clean

설치

bash
npm install -g nanoimage

Node.js 18 이상이 필요합니다.

자동화

yaml
- run: npm install -g nanoimage
- run: nanoimage compress ./public/images --quality 75 --output ./public/images-optimized

시작하기

문서:https://nanoimage.net/docs/cli

CLI 페이지:https://nanoimage.net/cli