update pm, remove images, and use toDataUrl