No, because the example environment is an extension of Verbatim, and you can't includegraphics inside it.  

Could use the example environment  in the input and output hooks?