The idea that ostriches are partial to eating horseshoes goes back a long way. Hundreds of years in fact. See this 14th century depiction of a horseshoe (and nail) Struthioniforme mealtime. But can the birds actually eat and digest them?
Over the centuries, several experiments have been performed to find out, and some are recounted in an article by researcher Thierry Buquet for the Medieval Animal Data-Network in their research blog MAD.hypotheses.
“The oldest such experiment I have found appears in an Arabic context and dates from the ninth century. The great al-Ğahiz relates this experiment in his Kitāb al-hayawān (Book of Animals). After having proven that the ostrich stomach cannot melt rocks with its supposedly burning belly, al-Ğahiz relates the following experiment that had been told to him. One day, two scholars threw burning embers to an ostrich that swallowed them without hesitation. After that, they threw burning stones and the bird swallowed them too. Going further, they heated small bits of metal, and the ostrich ate those as well (what an appetite!). The two scholars were quite incredulous and wanted to check whether the ostrich was really able to digest this metal, even though they had to sacrifice the bird by opening up its belly.”
Note regarding the illustration: Bas-de-page scene of a man feeding horseshoes and nails to an ostrich. The Queen Mary Psalter, 1310-1320. London, British Library, Ms Royal 2B vii, f. 114r
Safety note: Those involved with ostriches should not attempt to feed them horseshoes or any other metal items. In case of accidental ingestion of iron objects (by an ostrich) you might seek the help of a professional veterinarian practised in the use of cow magnets (rather than horseshoe magnets).