Currently, I am working with Next.js and have a few SVG files stored in the public
directory:
/public/branding/logo.svg
/public/branding/brand.svg
/public/branding/slogan.svg
To display these images, I am using the img
tag like this:
<img src='/branding/logo.svg' />
However, I am facing an issue where the image is not appearing. Interestingly, when I right-click on the image source in Google Chrome's Dev Tools, I can open the SVG file in a new tab and view its content.
Despite being able to see the content, there is a message that says:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
What could be causing this problem?