Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible show icon in desktop notification body javascript

Currently i have requirement to show image inside the desktop notification body but I am not sure is it possible or not -

notification = new Notification("title", "user1"), {
  icon: baseUrl + '/image/icon.png',
  body: "message"   // here i want add my custom image
});

if possible then i need the way to implement it.

like image 781
Nilesh Nartam Avatar asked Mar 07 '16 13:03

Nilesh Nartam


1 Answers

you can use base64 in the icon property

new Notification('name',{icon:/*base64 url*/})

here is a site the convert images to base64

like image 77
Zamboney Avatar answered Oct 09 '22 14:10

Zamboney