A Gatsby plugin to turn remote inline images to local static images
npm install @draftbox-co/gatsby-wordpress-inline-imagesgatsby-source-wordpress doesn't process images in blocks of text which means your admin site has to serve the images. This plugin solves that.
gatsby-source-wordpress and gatsby-image to be preinstalled
gatsby-wordpress-inline-images by (@TylerBarnes) and from now on I am going to maintain this repo.
bash
yarn add @draftbox-co/gatsby-wordpress-inline-images
`
Add this plugin as a plugin of gatsby-source-wordpress.
Be sure to specify your baseurl and protocol a second time in the gatsby-wordpress-inline-images options, not just in the gatsby-source-wordpress options.
`javascript
{
resolve: gatsby-source-wordpress,
options: {
baseUrl: your-site.com
protocol: https,
plugins: [
{
resolve: @draftbox-co/gatsby-wordpress-inline-images,
options: {
baseUrl: your-site.com,
protocol: https
}
}
]
}
}
`
Options
`javascript
{
resolve: gatsby-source-wordpress,
options: {
// required
baseUrl: your-site.com,
protocol: https,
// defaults
maxWidth: 650,
wrapperStyle: ,
postTypes: ["post", "page"],
backgroundColor: white,
withWebp: false, // enable WebP files generation
useACF: false, // process
tags in ACF fields too
// add any image sharp fluid options here
// ...
}
}
``