Don't crash in WTS if there is no img in figure

The WTS assumed that it would always find an img token inside a figure and
crashed if that was not true. Avoid crashing and log the error for now.

Change-Id: Ic4454b5772009cd2f34785f3a12a71fb9dd4c22c