diff --git a/epub.php b/epub.php index 1498cee..dfb7ed2 100644 --- a/epub.php +++ b/epub.php @@ -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);