Why is it recommended to not use images as headings for accessibility reasons?

Using images as headings can be problematic for accessibility reasons because screen readers may not be able to interpret the text within the image, making it difficult for visually impaired users to understand the content. To ensure accessibility, it is recommended to use actual text for headings instead of images.

<h1>This is a heading</h1>