pagination and fix images/thumbnails