You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Simplify image_block() API - accept file object directly (v0.16.0)
BREAKING CHANGE: image_block() now accepts file object instead of individual parameters
- Simplified API from 7 parameters to 1: image_block(file=uploaded.file)
- Auto-extract all metadata from uploaded file object (id, url, name, size, ext, dimensions)
- Auto-detect MIME type from extension or file.mime
- Auto-calculate aspect ratio from dimensions
- Removed aspect_ratio parameter (calculated automatically)
- Updated all tests, examples, and documentation
- Reduces code by 80% and eliminates parameter errors
Migration:
Old: image_block(file_id=f.id, src=f.url, file_name=f.name, ...)
New: image_block(file=uploaded.file, caption="...")
0 commit comments