In the wild, elephants eat mostly grass, wild fruits, twigs, shrubs, bamboo and a variety of plants. Their main food source is grass when it is available to them. Elephants will also happily eat tree bark, plant roots and even soil. Elephants are herbivores and roughly digest only 50% of their food. Elephants are known to have a sweet tooth and they like sugar cane, bananas and watermelon which are all nutritious. It has been observed that wild elephants
make their way to the dump in search of edibles. Human garbage dumps can provide some suitable food that elephants find pleasing to their palates, for instance fruit and veggie scraps.
See the paper “The elephant at the dump: how does garbage consumption impact Asian elephants?”

A note here on this topic: It is a myth that elephants like peanuts. Hungry elephants raid crops of farmers in Asia and Africa. Human Elephant Conflict (HEC) has become a substantial dilemma. Farmers in India, for instance, make alcohol out of rice and grain which has some times resulted in another problem – drunk elephants. The mammals break in where the alcohol is stored and helping themselves to the dismay of the farming community. HEC has to be dealt with so that the run-ins between the human and non-human species can be hopefully solved.

On the topic of captive elephants’ food consumption, it’s a habit of many people to give handouts to these beautiful giants. As one source told me, bread and biscuits, still wrapped in plastic paper, are some times given. In a zoo in Japan, flowers (perhaps contaminated) have been fed. Two elephants died and others got ill.

Sangita Iyer has recently covered this issue in-depth: What Kind Of Monster Would Feed Meat To An Elephant?

In the good old days, most Hindus did not eat meat, however, things changed after people from India began migrating to western countries. People can eat whatever they want, but the audaciousness of religious institutions to feed meat to a herbivorous animal, that too a cultural icon glorified as the embodiment of Lord Ganesh, is simply intolerable.

The thought of meat given to strictly vegetarian elephants is as crazy as ground up meat particles that has been given to cows who are herbivores like elephants. Where are the boundaries and respect of the nature of the animals’ biology? In addition, I want to point to mahouts drinking alcohol at the Indian temple festivals, and that some elephants purposely have been given alcohol, perhaps to calm a potential musth bull during the loud and elaborate temple festivities. It is known that alcohol addiction is an issue that a number of mahouts harbor. Elephants also suffer when they are given poor quality of nutritious food like lots of palm leaves and not much else and lack of adequate water. In my humble opinion this could cause serious health problems. I personally witnessed cases of intestinal impaction that were deadly. Giving only one or two kinds of food would be considered malnutrition. Many captive elephants get cultivated food that is chemically contaminated, which could compromise their health over time.