html - peeker rewrite_html_transform_img_tags does not show full path -


do 1 have experience on peeker library email fetching? https://github.com/sophistry/peeker

i using library fetching email , show in html page,

everything works fine, not render inline images in html, below code, inline images stored in local folder in html link src not getting complete,

$this->peeker->set_attachment_dir('./uploads/attachments/');                     $email->save_all_attachments('./uploads/attachments/');                      $email->rewrite_html_transform_img_tags($this->peeker->get_attachment_dir());                     $newbody = $email->html_rewritten; 

when open html , inspect element of picture, source path not seems completed,

see below,

<img height="177" width="284" apple-width="yes" apple-height="yes" apple-inline="yes" id="b13231b0-e5d8-49c8-9d89-52a3f8f039f0" src="./uploads/attachments/916207711e0253ebff5d3d24702718fc/images.jpeg" class=""> 

how can show complete path of src="...

i can see images.jpeg in path .../uploads/attachments/images.jpeg,

any advice this?

i solved myself!, given base url in function,

$email->rewrite_html_transform_img_tags($base_url = 'http://localhost/testcenter/uploads/attachments'); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -