I had a problem with non-homepage, non-post images being broken after enabling custom permalinks. I solved this as far as my header image was concerned by adding bloginfo('template_directory'); before my image directory.
However, the image I use for comments also suffered from the permalink change. At first I stupidly cut and paste before realising I had php tags within php tags resulting in a t-string error.
Since, I have tried adding curly braces, parentheses, single and double quotes all to no avail.
In the grand scheme of things this is a small problem but a very annoying and niggly one. Here’s how I left my code: