Skip to content

Add absolute image renderer#10

Open
NathanSebhastian wants to merge 1 commit intoSaraVieira:mainfrom
NathanSebhastian:master
Open

Add absolute image renderer#10
NathanSebhastian wants to merge 1 commit intoSaraVieira:mainfrom
NathanSebhastian:master

Conversation

@NathanSebhastian
Copy link

  • Add absolute image renderer to localhost:9000 as shown in
  • Allow EPUB generator to download the image from local production build

Closes #8

Allow EPUB generator to download the image from local production build
@netlify
Copy link

netlify bot commented Dec 31, 2020

👷 Deploy request for wizardly-snyder-c98440 pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: b612d15

};

export const absoluteImageRenderer = ({ src, alt }) => {
src = src.replace("./", "http://localhost:9000/")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a variable in the book info that takes care of the local URL, I am using it here:

await page.goto(info.localURL, {
waitUntil: "networkidle2",

Mind using that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image not downloaded for Epub?

3 participants