resize chain image so it fits on the correct page