Skip to content

Images are cropped to a square on Android, both in chat preview and fullscreen view #953

@zsky01

Description

@zsky01

Describe the bug

When users share images (for example, screenshots) that are rectangular, especially long ones, they are cropped to a square in the message preview. The bigger issue is that even when you tap to open the image in fullscreen, it still appears cropped to the same square instead of displaying the full original image.

To Reproduce

  1. On an Android device, send a rectangular image (for example, a long screenshot) in a chat.
  2. Observe that it is displayed as a square in the message.
  3. Tap the image to open it in fullscreen.
  4. The image is still cropped to a square instead of showing its full dimensions.

Expected behavior

Even if the chat preview crops the image for layout purposes, tapping it should open the full, uncropped image in fullscreen. Alternatively, the image should be displayed in full directly in the chat without cropping.

Screenshots

Original image:
Image

Chat preview:
Image

Fullscreen:
Image

Observed behavior

  • Image appears cropped to a square both in preview and fullscreen on Android.
  • Original image dimensions are lost in the display.

Environment

  • Deployment: a self hosted installation of Chatwoot.
  • Device Name: Xiaomi 15
  • OS Version: Xiaomi HyperOS 2.0.114.0 (Android 15)
  • Chatwoot App Version: 4.1.0
  • Chatwoot Server Version: 3.16.0

Additional context

This affects usability for sharing long screenshots, documents, or any non-square images.

Possible fixes

  • Modify image viewer logic to preserve the original aspect ratio in fullscreen mode.
  • Ensure that fullscreen view loads the original, uncropped file rather than the thumbnail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions