Pulling assets (images) locally


I would like to pull images on build so that I can embed the static assets in my page markup, instead of making external calls to DatoCMS each time.

For me, retrieving content from an external network on the frontend has some security issues which we are a pain to unblock.

Is this currently possible?

Example: https://www.gatsbyjs.org/tutorial/wordpress-image-tutorial/#creating-graphql-queries-that-pull-in-images-from-wordpress

hey @endymion1818 I think we would need an addition to our source plugin, similar to what the Contentful source plugin is doing here: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-contentful/src/download-contentful-assets.js

We are open for Pull Requests on this of course! Otherwise we’ll note this down and add it to our feature requests, unfortunately we cannot work on it right now :frowning:

No worries Mattias, thanks for the reply!

1 Like