Proper image resizing for embedded images, corresponding unit test and a sample xhtml