Go to console

Send an image in the notification payload

The FCM HTTP v1 API and the Notifications composer support sending image links in the payload of a display notification, for image download to the device after delivery. Images for notifications are limited to 1MB in size, and otherwise are restricted by native Android image support.

Build the send request

In your notification send request, set the following AndroidConfig option:

  • notification.image containing the image URL

For example:

POST https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send HTTP/1.1

Content-Type: application/json
Authorization: Bearer ya29.ElqKBGN2Ri_Uz...HnS_uNreA

{
  "message":{
    "token" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
     "android": {
       "notification": {
           "body" : "This is an FCM notification that displays an image.!",
           "title" : "FCM Notification",
           "image": "url-to-image"
       }
   }
}

With notification set as shown, this send request enables the receiving client to handle the image delivered in the payload.