The image library stores every uploaded image as an object in S3-compatible object storage and records its metadata — dimensions, byte size, thumbhash, and storage path — in Postgres. Before you can upload anything, you must enable and configure S3 in Settings → Assets (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/syhily/yufan.me/llms.txt
Use this file to discover all available pages before exploring further.
/admin/settings/assets). The library itself is always readable; only write operations require the storage toggle to be on.
Prerequisites
S3 storage must be enabled before any upload will succeed. Navigate to Settings → Assets and turn on Enable S3 uploads, then fill in your bucket credentials, region, and the public CDN host. Without this configuration, all upload endpoints return503.
Uploading images
Generic uploads
The main image library is at Admin → Image Library (/admin/library/images). Each file you upload is stored at the path:
Category cover images
When you create or edit a category, the Edit Category dialog includes an inline image uploader. The uploaded image is stored at:Friend banner images
The Edit Friend dialog includes an equivalent inline uploader. The banner is stored at:Image processing
Every uploaded image passes through the Sharp processing pipeline before it reaches S3:- Re-encoded to JPEG at the quality level set in Settings → Assets (
blog.assets) - Byte size checked both before and after processing — the upload is rejected if either exceeds the configured limit
- Dimensions recorded in the Postgres
imagerow
Using images in posts
Two entry points in the Tiptap editor open the image picker:- Image Library button in the top toolbar
/imageslash command in the body
image block with the storage path reference.
Image URLs
The public URL for any image is:asset.scheme and asset.host come from Settings → Assets. The admin library appends a ?v=<updatedAt> cache-buster whenever an image is re-uploaded to the same key, so CDN and browser caches refresh immediately.
yufan.me pre-generates a thumbhash for every uploaded image. Thumbhashes are compact perceptual placeholders (stored in the
image row) that the feed renderer uses to show a low-quality blurred preview while the full image loads. They are computed at upload time and can be recalculated from the Admin image library if needed.