img Failed to load resource: the server responded with a status of 404 (Not Found)
时间: 2023-09-22 11:10:54 浏览: 154
出现"img Failed to load resource: the server responded with a status of 404 (Not Found)"的错误通常是由于请求的图片资源在服务器上不存在导致的。根据引用、引用和引用的内容,我可以给出两种可能的解决方案。
方案一是修改配置文件。你可以找到配置文件中的index.js,然后修改assetsPublicPath为"./"。这样做可以确保资源的路径正确,避免出现404错误。
方案二是检查前端代码中图片资源的渲染问题。根据引用的内容,如果在渲染页面时出现404错误,可能是因为在前端页面中渲染图片时出现了问题。你可以仔细检查一下前端代码,确保图片资源在前端正确加载和渲染。另外,也可以尝试重新向后端请求数据来解决这个问题。
综上所述,你可以尝试以上两种方案来解决"img Failed to load resource: the server responded with a status of 404 (Not Found)"的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [报错解决——Failed to load resource: the server responded with a status of 404 (Not Found)](https://blog.csdn.net/m0_51511286/article/details/123127476)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [vue打包npm run build时候界面报错的解决](https://download.csdn.net/download/weixin_38626943/13128820)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Failed to load resource: the server responded with a status of 404 (Not Found) 报错](https://blog.csdn.net/sdsdvsdvs/article/details/126335311)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文