Added the ajax like behaviour to return the thumbnails.