If you are using frozen cod fish, thaw it ahead.
Place cod fish in a food processor and process until finely chopped. As an alternative, chop it with the help of a sharp fork and knife.
Add diced onion, egg, olive oil, salt, pepper and flour to the minced fish. Mix, then pour in milk and give a good stir until well combined.
Place in the refrigerator for 10 to 15 minutes (optional but recommended for better fish cakes).
Heat a large nonstick skillet and grease with cooking spray, olive oil or butter.
Scoop out some of the fish mixture and, with the help of your hands, form into a flattened circle. When the skillet is hot, pan fry fish cakes over medium heat until the bottom is golden, then flip and cook on the other side.
Serve warm and enjoy!