When trying to fry onions, the edges burn instead of the onions frying up
This depends on the result you are looking for.  I'm not sure if you want onions that are crispy or caramelized. You describe wanting them to be crispy, but it looks like the attempt pictured was aiming for caramelized.
For onion crisps, you need to deep fry in plenty of oil, as the comments suggest. You should take care that your onion slices of pieces are the same size.  Deep fry until golden, then remove from oil and drain well.  You should be able to crisp onions in a few minutes.
However, deeply and evenly caramelized onions take quite a while...40 to 45 minutes.  The heat needs to be medium or lower.  Also, slice evenly.  Pieces of different size will cook differently.  You do not need an excess amount of fat, in this case.  2 - 3 tablespoons of butter is fine for 3 - 4 large onions.  Melt the butter, add onions and stir to coat.  Then leave them alone for about 5 minutes. Stir and scrape up the fond.  Repeat this every 5 minutes or so, reducing the heat if they are cooking too fast. They will not become fully caramelized and jammy until the 30 to 40 minute mark.  You should also deglaze the pan at the end, to release the remaining fond. You can add 1/4 cup water, balsamic vinegar, wine, broth...really anything here.
If you just want an evenly browned, pan-fried onion.  Begin the caramelization process described above, and stop when the onions are browned to your liking.  In general, from the picture you post, I would say your heat is too high.