Added pagination for images.