Most of the carbon costs of providing food comes from the process of growing it, not transporting it. Most of the carbon costs in transportation also come from consumers driving to and from grocery stores. See: https://www.salon.com/2012/06/16/eating_local_hurts_the_plan...
Food has to be prepared in any event. On the other hand, a move to locally produced food to save energy from transportation can be more than cancelled out if the production requires more energy input.