Format and size requirements
Format: Image messages include a JPG thumbnail, followed by Base64 encoding.
Size: After Base64 encoding, aim for 5k, with a max of 80k. Note: After encoding, remove all \r\n, \r, and \n.
How to generate thumbnails
-
Check the width or height of the original image. Compress if either side exceeds 240px.
-
Scale the image proportionally, keeping the longest side at 240px and the shortest at 100px.
-
Compress the image to 30% of its original size to meet the recommended size.