Skip to content

Resize chat image previews naturally#34

Draft
zzj3720 wants to merge 2 commits into
mainfrom
codex/image-preview-size
Draft

Resize chat image previews naturally#34
zzj3720 wants to merge 2 commits into
mainfrom
codex/image-preview-size

Conversation

@zzj3720
Copy link
Copy Markdown
Contributor

@zzj3720 zzj3720 commented May 20, 2026

Summary

  • size chat image previews from intrinsic dimensions when they are within bounds
  • constrain oversized previews to max 640x520 and upscale tiny previews to at least 160x120 while preserving aspect ratio
  • apply the same sizing helper to attachment images and markdown images, and remove the old fixed thumbnail/max-height clamps

Validation

  • cd web && yarn typecheck
  • cd web && yarn lint
  • cd web && yarn test
  • cd web && yarn build:embedded (passes with existing rspack asset-size warnings)
  • Manual/non-GUI sizing sanity: 400x300 => 400x300, 1436x1240 => 602x520, 80x60 => 160x120, 1024x1024 => 520x520. Full Safari visual smoke was blocked in this broker runtime by macOS launch error -10810.

Managed via Tart and others added 2 commits May 20, 2026 02:41
Co-authored-by: 3720 <zuozijian1994@gmail.com>
Co-authored-by: 3720 <zuozijian1994@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant