displaying thumbnails on search page