That error is on the Browser Page, especially on WhatsApp Internal Functions
*match() method matches a string against a regular expression ***
so variable **a ** is not a String
I am checked the base64 image you tried to send.
is not a valid PNG file.
data:image/png;base64,PGh0bWw+DQo8aGVhZD48dGl0bGU+NTA@EdhdGV3YXkgVGltZS1vdXQ8L3RpdGx1PjwvaGVhZD4NCjxib2R5Pg0KPGNlbnRlcj48aDE+NTA@EdhdGV3YXkgVGltZS1vdXQ8L2gxPjwvY2VudGVyPg0KPC91b2R5Pg0KPC9odG1sPg0K
is a HTML
<html> <head><title>50
I think URL you set as image sends you a 50X HTTP code, maybe 502 Bad Gateway
perhaps the URL is protected from a bot and direct link, you need get creative on this reqOptions at MessageMedia.fromUrl(url[, options])