add thumbnail function in backend