Organisms that produce their own food through photosynthesis or chemosynthesis, such as plants or algae.