This commit is contained in:
quenousimporte 2024-06-11 15:06:35 +02:00
parent cb706113cd
commit 968339cfd9
1 changed files with 2 additions and 0 deletions

View File

@ -112,6 +112,8 @@
$imageid = $image->ContentItemId;
$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
// Download image from source, put it in temp and include it into article main html content.
// Then pass true to last AddPage param to download image to epub.
$tempimgpath = './temp/' . $imageid . '.jpg';
$tempcontent = file_get_contents($imageurl);
file_put_contents($tempimgpath, $tempcontent);