-
I am using the long text field in contentful and when inserting assets they are loaded via contentful cdn. I have been trying to make sure the assets are loaded locally but I cannot get it to work when assets are inserted into the Long Text Field - for example a blog post with bunch of inline images in the body. Has anyone managed to load these assets locally? I want to avoid using rich text type if it is possible to do it with long text field. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Here is a sample graph ql query export const query = graphql`
query pageQuery($slug: String!) {
contentfulPage(slug: { eq: $slug }) {
title
slug
subHeading
metaDescription {
internal {
content
}
}
body {
childMarkdownRemark {
html
excerpt(pruneLength: 320)
}
}
}
}
` dangerouslySetInnerHTML={{ __html: props.body.childMarkdownRemark.html }} will output the content but inline images are all loaded via cdn |
Beta Was this translation helpful? Give feedback.
-
any help will be appreciated 💯 |
Beta Was this translation helpful? Give feedback.
-
no one has done this before? just loading images locally instead of using contentful cdn :( |
Beta Was this translation helpful? Give feedback.
-
I replied here: contentful-labs/starter-gatsby-blog#143 Short: Use Contentful CDNs, thats what they are there for. Otherwise do what you do anyways: Code to get your use case done 🙃 |
Beta Was this translation helpful? Give feedback.
I replied here: contentful-labs/starter-gatsby-blog#143
Short: Use Contentful CDNs, thats what they are there for.
Otherwise do what you do anyways: Code to get your use case done 🙃