Asian elephants in Peninsular Malaysia are diversifying their diets to adapt to fragmented forests altered by logging and hydropower development.