I'm a French national living in another EU country (United Kingdom). My French ID will expire this year. Will I be able to renew it either from abroad, or in person in my old town in France? Or do I need to be a resident in France to renew it? (I have a passport, as well, so strictly speaking I don't need it, but I find it easier to travel around the EU and within the UK on an ID card)
You can do it at a consulate, the costs (it's free if you still have the old one, €25 otherwise) and requirements are the same, except that you usually need to make an appointment in advance, whereas it's not always required in small towns. I have done it several times at different consulates with no issues (but it can take a couple of months). If you have a passport that's still valid or an ID card that expired less than 5 years ago, you only need that, two photos and a proof of address (justificatif de domicile).
When applying in France, I am not sure whether living in the town where you apply is actually a requirement but that's what vosdroits.service-public.fr suggests. Still, if you can get some proof of address (utility bill under your name if you still own a house or maybe some family willing to say you live with them…), you could presumably also do it in France without actually residing there but you will need to go back a few weeks later to pick the card up so it's not particularly convenient.
On the other hand, there is nothing special about your former place of residence in this respect. You can vote in local elections there – if you chose to remain registered – but not renew your ID. So to the extent that renewing your ID in France is possible, it should be possible elsewhere too.
Incidentally, registering with a consulate or notifying the authorities of a change of address is definitely not mandatory so even though there is an address on the card and you do have to submit a proof of address to get it, it does not have much evidential value and does not need to be up to date.
I would add two elements to Gala's great answer:
Go to https://www.service-public.fr/particuliers/vosdroits/F21089 to get the instructions to renew your French ID if living in another country.
France extended the validity of this card and it is now valid for 15 years (instead of 10), and it is retroactive. From https://www.service-public.fr/particuliers/vosdroits/F21089:
Si votre précédente carte a été délivrée entre 2004 et 2013 et que vous étiez majeur lors de sa délivrance, elle reste valide 5 ans après la date d'expiration qui est indiquée.
If your previous card was issued between 2004 and 2013 and you were of age at the time of issue, it remains valid 5 years after the expiry date indicated.