Your code will not work if element will have several images with some text in it