Preheat oven to 375° F. Cover a baking sheets in parchment paper and grease with avocado or olive oil.
Strain water/oil from sardines, then mash with a fork in a large mixing bowl.
Add the white onion, ginger, smoked paprika, basil, ground pepper, sea salt, Dijon, and apple cider vinegar to the sardines and mix well.
Beat the eggs in a separate bowl, then add eggs and almond flour or panko to the fish mixture and mix together.
Shape into 8 patties. Place on a parchment-lined plate, cover, and refrigerate for at least 30 minutes.
Place sardine cakes onto the oiled parchment sheet, evenly spaced.
Bake sardine cakes for 10 minutes on top rack of oven. Turn the cakes and bake for another 10 minutes, until cakes are golden brown.