이미지 변환과 서명된 URL
이미지를 즉시 크기 조정 및 최적화하여 제공하고, Supabase Storage의 서명된 URL로 비공개 파일에 대한 임시 접근 권한을 부여합니다.
이미지 변환과 서명된 URL은(는) CoddyKit의 무료 Supabase Backend as a Service 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Supabase Backend as a Service 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Supabase Backend as a Service 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Smarter File Delivery
Supabase Storage can transform images on request and create signed URLs for time-limited access to private files. Both reduce custom backend work.
Public vs Private Buckets
Public buckets serve files via a permanent URL. Private buckets require a signed URL or an authenticated request, controlled by policies.
Getting a Public URL
For public buckets, build the URL directly, no token needed.
const { data } = supabase.storage
.from('avatars')
.getPublicUrl('user-42.png');
console.log(data.publicUrl);On-the-Fly Resizing
Pass transform options to request a resized version. Supabase generates and caches it.
const { data } = supabase.storage
.from('avatars')
.getPublicUrl('user-42.png', {
transform: { width: 100, height: 100, resize: 'cover' }
});Why Transform at the Edge?
Serving a 100px thumbnail instead of a full-size photo saves bandwidth and speeds up pages, without storing many copies yourself.
Quality and Format
You can also tune quality and request modern formats to shrink payloads further.
function thumbOpts(size) {
return { width: size, height: size, quality: 75, resize: 'cover' };
}
console.log(thumbOpts(64));Creating a Signed URL
For private files, generate a URL that expires after a set number of seconds.
const { data } = await supabase.storage
.from('invoices')
.createSignedUrl('inv-2026.pdf', 60);
console.log(data.signedUrl);Choosing an Expiry
Keep expiry as short as the use case allows. A download link might need 60 seconds; an embedded image might need an hour.
function expirySeconds(useCase) {
return useCase === 'download' ? 60 : 3600;
}
console.log(expirySeconds('download'));Signed URLs With Transforms
You can combine a signed URL with an image transform to serve resized private images securely.
Caching Behavior
Transformed images are cached at the edge, so repeated requests for the same size are fast. Vary the size sparingly to keep cache hits high.
Putting It Together
Use public URLs and transforms for open assets, and signed URLs for private files, with short expiries and edge caching for performance.
Quick Check
Test your understanding of URLs and transforms.
Recap
You learned to build public URLs, apply on-the-fly image transforms for performance, and create expiring signed URLs for private files, plus how edge caching keeps it fast.
자주 묻는 질문
“이미지 변환과 서명된 URL” 강의는 무료인가요?
네 — “이미지 변환과 서명된 URL” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Supabase Backend as a Service 강의 전체를 잠금 해제할 수 있습니다. Supabase Backend as a Service 강의에는 총 4개의 강의가 포함되어 있습니다.
“이미지 변환과 서명된 URL”에서 뭘 배우나요?
이미지를 즉시 크기 조정 및 최적화하여 제공하고, Supabase Storage의 서명된 URL로 비공개 파일에 대한 임시 접근 권한을 부여합니다. 브라우저에서 직접 실행하는 실습 코드로 Supabase Backend as a Service을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
Supabase Backend as a Service을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 Supabase Backend as a Service은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“이미지 변환과 서명된 URL” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 Supabase Backend as a Service 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 Supabase Backend as a Service 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- Supabase 버킷에 파일 저장
- 정책으로 접근 권한 관리
- 미디어 업로드와 가져오기
- 이미지 변환과 서명된 URL