Web send image message, mobile client can’t display?

Overview

If an image message sends successfully but doesn’t display, it’s usually a thumbnail error.

Solution

  1. For mobile clients using IMKit, include the content (image base64) parameter when sending an image message.

  2. Ensure the base64 thumbnail meets these conditions:

    • The thumbnail (content field) must be a base64 string in jpg format.
    • The base64 thumbnail must exclude any prefix.
    • The base64 string size must stay under 80 KB.
  3. Check the docs: https://docs.rongcloud.io/web-imlib/message/send#image

Note: Use FileReader or canvas to compress the image and generate the base64 string.