From b23a29eacaea6d57534edca9e8ec7260ac13293b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Fichot?= Date: Tue, 3 Apr 2018 15:05:55 +0200 Subject: [PATCH] Add extraMediasRegex parameter config --- packages/gatsby-source-wordpress/src/gatsby-node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-source-wordpress/src/gatsby-node.js b/packages/gatsby-source-wordpress/src/gatsby-node.js index b9fc54f522f8f..bd1084e698f42 100644 --- a/packages/gatsby-source-wordpress/src/gatsby-node.js +++ b/packages/gatsby-source-wordpress/src/gatsby-node.js @@ -32,6 +32,7 @@ exports.sourceNodes = async ( searchAndReplaceContentUrls = {}, concurrentRequests = 10, excludedRoutes = [], + extraMediasRegex, } ) => { const { createNode } = boundActionCreators @@ -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({