Thanks for sharing this. I tried to display the Data URI without replacing those 2 characters and came here searching for a solution. Here’s the code I used in my project.

//* PageSpeed Screenshot setup
$shot_replace = array( "_", "-" );
$shot_real = array( "/", "+" );
$shotdata = str_replace( $shot_replace, $shot_real, $pageshot->data );

It’s been a few years after your post and I see another set of data as follows,

"page_rect": {
"left": 0,
"top": 0,
"width": 1024,
"height": 768

Does that mean we can get a bigger resolution screenshot?

Thank you,