Refactoring of thumbnails latte helper