Sometimes img tag fails to load the image from the given URL and shows a broken image indicating it’s failed to load.

Even though the URL is correct it will not load.

One of the reasons could be the server is responding wrong Content-Type

When you load an image, the Content Type should be something like image/jpeg or image/png, but you might observe octet-stream, which means it’s the raw binary format, and the browser doesn’t know how to handle it.