Open ghost opened 5 years ago
Hi @LittleHamster, you can try this Download assets for static distribution
Enable this feature with the downloadLocal: true option.
@tumdav was this recently updated?
I set this to true but images are still loaded via their domain, any ideas?
I tried to use this config setting as well and it did not pull down Contentful images. I verified by checking the static assets folder after build. In my case I was trying to pull embedded assets for Rich Text fields and Markdown Long Text fields. I did not try with separate media fields.
I set this to true but images are still loaded via their domain, any ideas?
@LittleHamster you have to query files on this way
query BlogPostBySlug($slug: String, $locale: String) {
contentfulBlogPost(slug: { eq: $slug }) {
title
publishDate(formatString: "MM/DD/YYYY")
image {
localFile {
childImageSharp {
fluid(maxWidth: 1180) {
...GatsbyImageSharpFluid_withWebp_noBase64
}
}
}
}
body {
childMarkdownRemark {
html
}
}
}
}
I tried to use this config setting as well and it did not pull down Contentful images. I verified by checking the static assets folder after build. In my case I was trying to pull embedded assets for Rich Text fields and Markdown Long Text fields. I did not try with separate media fields.
Is it possible to download images locally and server them via custom domain?