Local notification in Ionic 4 with Capacitor: icon, image, no Cordova

I am using Ionic 4 Capacitor to display local notifications. I have followed the Ionic Capacitor local notification documentation, but the documentation was not complete.

I have been able to make the notifications work, but I cannot figure out how to show an image or change the icon. Is there anyone who has tested this and can help me?

This is the code I am using:

LocalNotifications.schedule({
  notifications: [
    {
      title: "aaaa",
      body: "Body",
      id: 1,
      actionTypeId: 'OPEN_PRODUCT',
      attachments: [
        { id: 'face', url: 'https://khanoo.com/wp-content/uploads/estate_images/house/77-1576179614/230174.jpg' ,options:{}}
      ],
      schedule: {
        every: "minute"
      },

      extra: null
    }
  ]
});

To display an image or change the icon in a local notification using Ionic 4 Capacitor, you can use the smallIcon and iconColor properties. Here’s an example code:

LocalNotifications.schedule({
  notifications: [
    {
      title: "aaaa",
      body: "Body",
      id: 1,
      actionTypeId: 'OPEN_PRODUCT',
      schedule: {
        every: "minute"
      },
      smallIcon: 'path/to/small/icon',
      iconColor: '#FF0000',
      extra: null
    }
  ]
});

Make sure to replace 'path/to/small/icon' with the path to your small icon and '#FF0000' with the color you want to use for the icon.