auto fit width and height of images in posts list