ImageKit
Website: imagekit.io
ImageKit adalah layanan optimasi gambar dan CDN berbasis cloud yang dipakai untuk semua upload file di Sutomo.
Ringkasan
Semua file upload melewati ImageKit untuk:
- CDN delivery — distribusi global cepat
- Optimasi otomatis — konversi WebP, kompresi, resize
- Transformasi via URL — resize/crop on-the-fly
- Private file — signed URL untuk dokumen sensitif
Integrasi
User Upload → Asset Model → AssetObserver → ImageKitService → ImageKit CDN → URLEnvironment Variables
env
IMAGEKIT_PUBLIC_KEY=your_public_key
IMAGEKIT_PRIVATE_KEY=your_private_key
IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_accountKredensial Development
Akun ImageKit bersama untuk pengembangan lokal (milik tim). Gunakan ini di .env lokal Anda agar semua developer memakai CDN dev yang sama.
| Variabel | Nilai |
|---|---|
IMAGEKIT_PUBLIC_KEY | public_JbmUC2vzh0wfdHxU5SgujPPIke0= |
IMAGEKIT_PRIVATE_KEY | private_bJCqmAqNI5iGaRtDFODSfTZXCIc= |
IMAGEKIT_URL_ENDPOINT | https://ik.imagekit.io/o2epoyqvj/ |
Masuk ke imagekit.io dengan:
- Email:
dev@icanntechindo.com- Password:
Dev_test@2026
⚠️ Ini hanya kredensial development — jangan pernah dipakai di produksi. Kunci produksi ada di environment deployment, bukan di
.env.
File Penting
| File | Tujuan |
|---|---|
app/Services/Asset/ImageKitService.php | Upload orchestration |
app/Services/Asset/CompressService.php | Kompresi gambar |
app/Services/Asset/ResizeService.php | Resize gambar |
app/Services/Asset/ConversionService.php | Konversi WebP |
app/Observers/Platform/AssetObserver.php | Trigger upload otomatis |