Images, Covers, and Notion Asset Caching
최규민
May 22, 20261 min read
Image handling
Notion file URLs can expire, so the app resolves Notion-hosted assets on the server and serves stable signed proxy URLs where needed.
Thumbnail sources
The app checks image-like properties such as thumbnail, image, and cover, then falls back to the Notion page cover.
Why signed URLs are used
- They prevent arbitrary external URLs from being proxied.
- They allow expiring Notion file links to be resolved behind a stable route.
- They make CDN caching safer.
Cache settings
plain text
NOTION_IMAGE_SIGNING_SECRET=random_secret
NOTION_IMAGE_CACHE_SECONDS=3300Best practices
- Use page covers for important posts.
- Compress large images before uploading.
- Avoid heavy animated GIFs.
- Add new external image hosts to images.remotePatterns in next.config.ts.