php 读文件
base64_encode(file_get_contents($path))
chunk_split($base64); //php - How to embed images in html email - Stack Overflow
base64_decode($base64); //Convert base64 to image file in PHP (netcell.netlify.app)
$file = '../image.jpg'; $type = 'image/jpeg'; header('Content-Type:'.$type); header('Content-Length: ' . filesize($file)); readfile($file);
<?php header("Content-type: image/jpeg"); readfile("/path/to/image.jpg"); exit(0); ?>