specify height and width of images to avoid reflows, and repaint