Including external images in epub

20 views
Skip to first unread message

Marcus Schiesser

unread,
Jan 28, 2015, 11:27:53 AM1/28/15
to press...@googlegroups.com
Hi, 

i am hosting pressbooks via a cloud service, so i store the images not in the wordpress media library. Unfortunately, when I generate a
epub, the images are not copied as assets. This might also be a problem if someone is using a CDN for caching reasons.
In my opinion there should be an option for copying external images too. What do you think?

Best,
Marcus
Message has been deleted

bdolor

unread,
Jan 28, 2015, 1:07:51 PM1/28/15
to press...@googlegroups.com

Hi Marcus,

It is not a requirement that images be placed in the media library for them to make it through the epub export routine. I'd start with confirming that `wp_remote_get()` is returning a wp_error which would cause `fetchAndSaveUniqueImage()` to return an empty string - https://github.com/pressbooks/pressbooks/blob/dev/includes/modules/export/epub/class-pb-epub201.php#L1622 

If that's the case, then I'd look at what HTTP transports (i.e. curl, streams) your hosting server supports: https://codex.wordpress.org/HTTP_API 

Brad.


Reply all
Reply to author
Forward
0 new messages