Preheat the oven to 180°C / 350°F / Gas Mark 4. Rub the bottom and sides of a gratin dish with butter.
Butter the bread slices on one side. Arrange a single layer of bread in the gratin dish, butter side up.
Scatter a good handful of blueberries over the layer, then use more bread to make another layer in the dish.
Scatter another handful of blueberries over this layer, then make another layer of bread. Continue in this way until you have used all of your bread and blueberries.
Place the cream and milk in a saucepan and bring to just under the boil.
While it's heating up, in a separate bowl whisk the eggs, caster sugar and vanilla extract, then pour the hot milk and cream into the eggs and whisk to combine.
Pour this custard over the bread and leave to soak for 10 minutes.
Sprinkle the granulated sugar over the top, then prepare a bain-marie. Place the gratin dish in a large, deep-sided roasting tin and pour in enough boiling water to come about halfway up the sides of the dish. This regulates the heat in the oven and ensures that the eggs don't scramble.
Carefully transfer the dish and bain-marie to the oven and cook for 1 hour. The top should be golden and the centre should be just set.
Serve with softly whipped cream.