1.1.0 • Published 5 years ago
gatsby-wordpress-content-images v1.1.0
Gatsby WordPress content images
gatsby-source-wordpress
doesn't process images in blocks of text which means your admin site has to serve the images. This plugin solves that.
Require gatsby-source-wordpress
and gatsby-image
to be preinstalled
installation
npm install gatsby-wordpress-content-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-content-images
options, not just in the gatsby-source-wordpress
options.
{
resolve: `gatsby-source-wordpress`,
options: {
baseUrl: `your-site.com`
protocol: `https`,
plugins: [
{
resolve: `gatsby-wordpress-content-images`,
options: {
baseUrl: `your-site.com`,
protocol: `https`
}
}
]
}
}
Options
{
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
// add any image sharp fluid options here
// ...
}
}