Peel and grate the potatoes and wrap them up in a clean towel and squeeze to remove as much moisture as possible.
Lightly beat the eggs with a fork in a large mixing bowl. Add the grated potato, onion, rosemary, salt, pepper, and flour and stir to combine.
In a large skillet heat the oil over medium heat. Drop approximately 2 heaping tablespoons of the potato mixture into the hot oil. Using the spoon pat down the potatoes to form a pancake.
Cook the pancake until the first side is golden brown before flipping. Once cooked, drain the potato pancakes on a paper towel. Keep them in a warm oven until ready to serve.
Notes
You can grate the potatoes and onion with a box grater or in a food processor fitted with a grating attachment.You can freeze the cooled potato pancakes for up to three months. Reheat them in the oven or air fryer for best results.