HTML

(记得添加<和/>,一般放在head内)

meta http-equiv="Content-Type" content="image/JPEG" charset="utf-8"

PHP

header("Content-type: image/JPEG")

拓展阅读

HTML meta标签总结与属性使用介绍
https://segmentfault.com/a/1190000004279791

MIME 类型
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types

点击数:17