How do I intercept and modify the functionality of wp_get_attachment_image()?

It might be a solution to string replace /wp-content/uploads with ” (empty) like for an example:

Lets say: wp_get_attachment_image() returns=”/wp-content/uploads/myimage.png”;

<?php
echo str_replace('/wp-content/uploads/', '', wp_get_attachment_image()); 
?>

This will result in echo: ‘myimage.png’

Try this:

function alter_image_src($attr) {
  $attr['src'] = str_replace('/wp-content/uploads/', '', $attr['src']);
  return $attr;
}
add_filter( 'wp_get_attachment_image_attributes', 'alter_image_src');

In your functions page (of theme).