Photoautotrophs such as plants use energy from sunlight to make organic compounds by photosynthesis. Chemoautotrophs such as certain bacteria use energy from chemicals to make organic compounds by chemosynthesis. Heterotrophs (consumers) obtain energy by consuming other organisms.