Howdy,
Had the same errors where it explodes on spaces in style urls show up and did this;
/**
* DAF: Fix validation error of base64 images in stylesheets.
*/
add_filter( 'the_content', 'daf_fix_amp_space' );
function daf_fix_amp_space( $content ) {
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
return str_replace('data:image/png; base64,', 'data:image/png;base64,', $content);
}
return $content;
}
Modify the image/png if you have it fail on something else.