Игорь Надеин
e14ccbf956
feat: implement Telegram-style image dimension pre-loading to fix auto-scroll
- Backend: added width/height fields to MessageAttachment model with Pillow auto-extraction
- Migration: 0021_add_image_dimensions + populate_image_dimensions management command
- API: serialize width/height in messageAttachmentSerializer and consumers.py
- Frontend: switched from CSS aspect-ratio to explicit pixel calculation (Telegram approach)
* messageRendererV2.js: calculate exact dimensions (maxWidth=500px, proportional height)
* Fixes scroll jump issue: images now reserve exact space before loading
* Debug logging added to validate dimension rendering
- Testing: 18/18 images populated successfully with dimensions
This prevents scroll position shifts when images load after initial positioning,
implementing the same approach as Telegram Web.
Related: scroll positioning, image preloading, chat UX
2026-01-14 17:32:06 +03:00
..
2026-01-14 17:32:06 +03:00
2025-09-09 17:55:15 +03:00
2026-01-09 14:48:43 +03:00
2026-01-05 11:20:56 +03:00
2026-01-14 17:32:06 +03:00
2026-01-14 17:32:06 +03:00
2026-01-09 14:56:44 +03:00
2026-01-09 14:14:01 +03:00
2026-01-08 16:14:00 +03:00
2026-01-09 14:48:43 +03:00
2025-11-20 09:00:55 +03:00
2025-07-30 08:15:53 +03:00
2026-01-13 10:19:26 +03:00
2025-12-03 12:59:12 +03:00
2026-01-09 16:57:48 +03:00
2026-01-13 15:02:29 +03:00
2025-09-11 17:56:33 +03:00
2026-01-14 17:32:06 +03:00
2026-01-14 17:32:06 +03:00
2026-01-14 17:32:06 +03:00
2025-07-30 08:15:53 +03:00
2026-01-05 10:47:56 +03:00
2026-01-08 16:14:00 +03:00
2025-10-20 17:08:40 +03:00
2025-11-20 09:00:55 +03:00
2025-09-03 17:17:44 +03:00
2025-07-30 08:15:53 +03:00
2026-01-05 07:41:34 +03:00
2026-01-05 07:41:34 +03:00
2026-01-08 16:14:00 +03:00
2026-01-06 07:48:04 +03:00
2026-01-08 16:55:54 +03:00
2026-01-09 15:07:55 +03:00
2026-01-13 09:18:25 +03:00