Generate thumbnails on upload. Frontend refactor.