resize image to fit layout