Issue when plot png image in phantomjs!

hello!
I use plotly.js,and plot svg string in phantomjs to get the renderd html.It runs fined!But when i plot table chart,i found the svg is very large because the table chart will create a png image and when run canvas.toDataURL(‘image/png’) in phantomjs will get a very large string.I knows there may be a bug in phantomjs when use toDataURL, there will be fixed by changing to canvas.toDataURL(‘image/jpeg’),or anyone who has better solutions?Thanks!