Skip to content

Commit

Permalink
Add extraMediasRegex parameter config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienfi authored Apr 3, 2018
1 parent 27ba612 commit b23a29e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/gatsby-source-wordpress/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports.sourceNodes = async (
searchAndReplaceContentUrls = {},
concurrentRequests = 10,
excludedRoutes = [],
extraMediasRegex,
}
) => {
const { createNode } = boundActionCreators
Expand Down Expand Up @@ -91,7 +92,7 @@ exports.sourceNodes = async (
entities = normalize.mapTagsCategoriesToTaxonomies(entities)

// Creates links from entities to media nodes
entities = normalize.mapEntitiesToMedia(entities)
entities = normalize.mapEntitiesToMedia(entities, extraMediasRegex)

// Downloads media files and removes "sizes" data as useless in Gatsby context.
entities = await normalize.downloadMediaFiles({
Expand Down

0 comments on commit b23a29e

Please sign in to comment.