Skip to content

Conversation

@devi-r
Copy link
Contributor

@devi-r devi-r commented Jan 12, 2026

Description

Fixes image cropping in chat bubbles. (#954)

  • Replaced separate iOS/Android ImageBubble implementations with an unified component using @nandorojo/galeria. (Replaced @alantoa/lightbox (unmaintained) in Android with Galeria after attempts to patch the cropping bug failed due to the library's rigid layout system. Unifying with iOS seemed to be the more robust and maintainable solution.)
  • Implemented dynamic height calculation based on image aspect ratio to fix cropping issues in thumbnails.
  • Added automatic size detection via "onLoad" for images missing backend dimensions.
  • Introduced width clamping to prevent small images from stretching to full container width.

Chat Preview:

| | |

FullScreen View:

| | |

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have tested in both Android and iOS platform
  • My changes generate no new warnings

Fixes https://linear.app/chatwoot/issue/CW-5450/android-chatwoot-app-v4017-bug-scaling-picture

- Replaced separate iOS/Android implementations with a unified component using "@nandorojo/galeria".
- Implemented dynamic height calculation based on image aspect ratio to fix cropping issues in thumbnails.
- Added automatic size detection via "onLoad" for images missing backend dimensions.
- Introduced width clamping to prevent small images from stretching to full container width.

Fixes image cropping in chat bubbles.
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