Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

FCM - Notification Image not displaying

Open
#818 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
firebase, java
Domain
api, backend

Research direction

Start with the referenced src/main/java/com/google/firebase/messaging/Notification.java and compare its image field with the linked Node.js imageUrl reference. Trace how the Notification is represented in the FCM request, then validate the supplied multicast example on iOS and Android; done means the notification image is displayed.

Written by the indexing model from the issue text.

Description

api: messaging
Describe your environment
  • Operating System version: macOS 13.0 (22A380)
  • Firebase SDK version: 9.1.1
  • Library version: 9.1.1
  • Firebase Product: Cloud Messaging (auth, database, storage, etc)
Steps to reproduce:

Images are not displayed on devices (both iOS and Android) when sending notifications with FCM.
I set the image URL using the Notification Builder.

List<String> fcmTokens = List.of(...);

Notification notification = Notification.builder().setTitle("Hello").setBody("world").setImage("https://e-cdns-images.dzcdn.net/images/cover/f2d3db07f3f045a048cdacf53b5cf9dd/250x250-000000-80-0-0.jpg").build();

MulticastMessage message = MulticastMessage.builder()
                .setNotification(notification)
                .addAllTokens(fcmTokens).build();

BatchResponse response = FirebaseMessaging.getInstance().sendMulticast(message);

Note that I receive the notification on the devices, only the image is not displayed. I am able to see the image in the notification when sending it using the Firebase Console.

When investigating the issue, I discovered that other SDKs use imageUrl instead of image attribute.
For example, for NodeJS: https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.notification.md#notificationimageurl

The Java SDK still uses the image key instead of imageUrl: https://github.com/firebase/firebase-admin-java/blob/master/src/main/java/com/google/firebase/messaging/Notification.java#L33

Dominant language
Java
Stars
620
Forks
305
Avg merge
3h 23m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-java

All issues in firebase/firebase-admin-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.