Fix WebAgg after write_png changes
Merge pull request #3763 from mdboom/fix-webagg

BUG : fix type being passed to png writer in webAgg