Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)

简介: Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)

在进行小程序开发的时候,引入静态图片,发生了问题:Failed to load local image resource Xx  the server responded with a status of  of 500 (HTTP/1.1 500)


看了很多博主的blog,发现了共性问题:图片路径没有按格式写标准。【其实看似是很小的问题,因为初学就会发生各种意想不到的错误,因此细心多检查就行】


such as:


1.直接使用../lutos.jpg 在使用相对路径时,看似没有太大问题,但是文件夹层数过多,也会报错


2.要检查后缀。以为会自动补全“.png/jpg”即只放lutos,这也是不对的。


3.错误写法: imgSrc: 'img\首页1.png' ,正确写法:imgSrc: '/img/首页1.png'


4.比如images是图片目录,必须把它放置在和pages(系统设定的页面目录)同级的位置;如果images和项目的根目录同级,就无法加载images中的图片。


而关于我的错误,是因为路径不完整,因此找不到图片位置,我错误的以为我的图片和saved Pictures 是同级路径了,经修改后,即可展示出来。


相关文章
|
1月前
|
机器学习/深度学习 前端开发 JavaScript
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
78 0
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
|
2天前
|
网络协议 PHP
Swoole 源码分析之 Http Server 模块
想要了解到 `Http Server` 的全貌,其实只要把那张整体的实现图看懂就足以了。但是,如果想要有足够的深度,那么就还需要深入 `Swoole` 的源代码中,就着源码自行分析一遍。同时,也希望这一次的分析,能够给大家带来对 `Swoole` 更多的一些了解。并不要求要深刻的掌握,因为,很多的事情都不可能一蹴而就。从自己的实力出发,勿忘初心。
12 0
Swoole 源码分析之 Http Server 模块
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
|
23天前
|
Kubernetes 容器 Perl
k8s部署seata 报错 没有提供足够的身份验证信息 [ http-nio-7091-exec-2] [ty.JwtAuthenticationEntryPoint] [ commence] [] : Responding with unauthorized error. Message - Full authentication is required to access this resource
Kubernetes pod 在16:12时出现两次错误,错误信息显示需要完整认证才能访问资源。尽管有此错误,但页面可正常访问。附有yaml配置文件的图片。
43 2
|
1月前
|
应用服务中间件 网络安全 nginx
Client sent an HTTP request to an HTTPS server
Client sent an HTTP request to an HTTPS server
115 0
|
1月前
|
Java 应用服务中间件
HTTP Status 404(The requested resource is not available)
HTTP Status 404(The requested resource is not available)
23 0
|
1月前
【web server】HTTP协议如何解析or封装
【web server】HTTP协议如何解析or封装
|
Web App开发 前端开发 关系型数据库
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
fuser可用于查询文件、目录、socket端口和文件系统的使用进程 1.查询文件和目录使用者 fuser最基本的用法是查询某个文件或目录被哪个进程使用: # fuser -v .
862 0
|
Web App开发 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
zookeeper watch的定义如下:watch事件是一次性触发器,当watch监视的数据发生变化时,通知设置了该watch的client,即watcher。
908 0