Thanks, but this won't work. The parent node may include much more than just the image, and this is not under my control. For example, in the following, the parent is a <td> element but there is much more than the image inside.
<td><a>some link</a><img src = someSource propertyA = 'someProperty' propertyB = 'otherProperty'> some text </td>