Fixed image size

Adds a unit test and uses a regexp rather than an exact string to detect HTML backends