img-src 通常指 内容安全策略(Content Security Policy, CSP)中的一条指令,用来规定网页允许从哪些来源加载图片(如 <img>、CSS 背景图等)。常见写法如:img-src 'self' https: data:;
/ˈɪmɪdʒ ˌɛs ɑːr ˈsiː/
Set img-src 'self' https: to allow images from the same site and HTTPS sources.
将 img-src 'self' https: 设定为允许从同站点与 HTTPS 来源加载图片。
In a strict CSP, misconfiguring img-src can cause third‑party avatars and tracking pixels to fail, which may break parts of the user interface.
在严格的 CSP 中,如果 img-src 配置不当,第三方头像和追踪像素可能无法加载,从而导致界面部分功能异常。
由 img(image 的常见缩写,表示“图片”)和 src(source 的缩写,表示“来源”)组合而成,中间用连字符连接,作为 CSP 指令名使用,字面意思就是“图片来源”。