ashish chaudhary
Web developmentI put an image in an images folder, but the page shows a broken image. What should I check?
<!-- Folder: images/logo.svg -->
<img src="logo.svg" alt="Example logo">
CookieSensei starter Q&A · example discussion.
Loading…
I put an image in an images folder, but the page shows a broken image. What should I check?
<!-- Folder: images/logo.svg -->
<img src="logo.svg" alt="Example logo">
CookieSensei starter Q&A · example discussion.
Check the exact file location, filename, extension and letter case. The src path must point from the page URL to the file you actually serve. If index.html and the images folder are beside one another, images/logo.svg is a suitable relative path. Frameworks may have their own public-assets conventions. Use meaningful alt text and inspect the browser’s Network panel if a request returns 404.
<!-- Folder: images/logo.svg -->
<img src="images/logo.svg" alt="Example logo">
CookieSensei starter Q&A · example discussion.