Preheat your oven to 350°F (175°C).
In a large oven-safe dish, spread a layer of sliced potatoes evenly on the bottom.
Top the layer of potatoes with a layer of sliced onions.
Next, add a layer of anchovies or sprats on top of the onions.
Repeat the layers until all the ingredients are used, finishing with a layer of potatoes on top.
In a saucepan, heat the cream over medium heat until warm but not boiling.
Pour the warm cream evenly over the layered potatoes, onions, and anchovies.
Dot the top of the casserole with small pieces of butter.
Season with salt and pepper to taste.
If desired, sprinkle breadcrumbs over the top of the casserole for a crispy finish.
Cover the dish with aluminum foil and bake in the preheated oven for about 45 minutes.
After 45 minutes, remove the foil and continue baking for an additional 15-20 minutes, or until the top is golden brown and the potatoes are tender.
Once done, allow the casserole to cool slightly before serving.