mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
Server: - Extract image width/height on upload via image.DecodeConfig (header-only) - Add width/height columns to attachments table (migration 007) - Include dimensions in AttachmentInfo JSON (optional, backward-compatible) Client: - Reserve exact space for images using server-provided dimensions - Fallback min-height: 200px for external/old images, cleared on load - Remove premeasureAll() — was caching wrong heights for unloaded images - Smart per-type height estimates: 32px dividers, 42/72px text, +220px per image attachment, +320px for YouTube embeds - Batch ResizeObserver corrections to single RAF with anchor-based scroll preservation (topmost visible item stays in place) - Fenwick tree for O(log n) offset lookups (replaces O(n) linear scans) - CSS contain: layout style on .msg-image to isolate layout shift
3 lines
101 B
SQL
3 lines
101 B
SQL
ALTER TABLE attachments ADD COLUMN width INTEGER;
|
|
ALTER TABLE attachments ADD COLUMN height INTEGER;
|