Like dynamically reformatting Man-mode buffers on window resizing in bug#32536 it would be useful to do the same for image-mode. By default, when an image is visited, it gets resized to fit into the window. But on window shrinking, parts of the image become truncated, and on window enlarging too much of empty space is wasted since the image is not zoomed. This patch relies on improvements in bug#32637.