implement lazy loading with Grid

I am trying to implement lazy loading with Grid in Vaadin 8. But it only shows an empty table. What do I do wrong? Also, how do I set the number of items to load (limit) to for example 20 items?

private Grid makeLazyTable()
Grid grid = new Grid();
DataProvider<Image, Void> dataProvider = DataProvider.fromCallbacks(
query → {
int offset = query.getOffset();
int limit = query.getLimit();
OffsetRequest request = new OffsetRequest();
List sort = query.getSortOrders();
return ImagesRepository.findAll(request, sort);
query → ImagesRepository.getImageCount()
return grid;

I found the answer myself.
I did not add any columns. This can be done for example with:

Grid grid = new Grid(Image.class);

This adds all columns.