Producers are organisms that create their own food through photosynthesis. They use sunlight, water, and carbon dioxide to make sugar (glucose), which they use as energy. While blue whales are animals, they eat krill, which are primary consumers. Krill, in turn, eat phytoplankton, which are producers.
So, even though blue whales themselves don't make their own food, they depend on organisms that do, making them part of a food chain that starts with producers.