Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-source-wordpress): enable image-cdn (#34832)
Co-authored-by: Matt Ehlinger <ehlinger.matt@gmail.com> Co-authored-by: veryspry <ehlinger.matt@gmail.com> Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
- Loading branch information
1 parent
46fe418
commit fe29c01
Showing
18 changed files
with
388 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
packages/gatsby-source-wordpress/__tests__/process-node.fixture.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
export const referencedMediaItems = [ | ||
{ | ||
"id": `cG9zdDoxMTU=`, | ||
"mediaDetails": { | ||
"file": `2022/02/sasha-set-GURzQwO8Li0-unsplash-scaled.jpg`, | ||
"height": 1920, | ||
"sizes": [ | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-300x225.jpg`, | ||
"fileSize": 18876, | ||
"height": `225`, | ||
"mimeType": `image/jpeg`, | ||
"name": `medium`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-300x225.jpg`, | ||
"width": `300` | ||
}, | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-1024x768.jpg`, | ||
"fileSize": 214590, | ||
"height": `768`, | ||
"mimeType": `image/jpeg`, | ||
"name": `large`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-1024x768.jpg`, | ||
"width": `1024` | ||
}, | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-150x150.jpg`, | ||
"fileSize": 7088, | ||
"height": `150`, | ||
"mimeType": `image/jpeg`, | ||
"name": `thumbnail`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-150x150.jpg`, | ||
"width": `150` | ||
}, | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-768x576.jpg`, | ||
"fileSize": 118086, | ||
"height": `576`, | ||
"mimeType": `image/jpeg`, | ||
"name": `medium_large`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-768x576.jpg`, | ||
"width": `768` | ||
}, | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-1536x1152.jpg`, | ||
"fileSize": 490613, | ||
"height": `1152`, | ||
"mimeType": `image/jpeg`, | ||
"name": `1536x1536`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-1536x1152.jpg`, | ||
"width": `1536` | ||
}, | ||
{ | ||
"file": `sasha-set-GURzQwO8Li0-unsplash-2048x1536.jpg`, | ||
"fileSize": 858627, | ||
"height": `1536`, | ||
"mimeType": `image/jpeg`, | ||
"name": `2048x2048`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-2048x1536.jpg`, | ||
"width": `2048` | ||
} | ||
], | ||
"width": 2560 | ||
}, | ||
"mediaItemUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-scaled.jpg`, | ||
"mediaType": `image`, | ||
"mimeType": `image/jpeg`, | ||
"sourceUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-scaled.jpg`, | ||
"srcSet": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-300x225.jpg 300w, http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-1024x768.jpg 1024w, http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-768x576.jpg 768w, http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-1536x1152.jpg 1536w, http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-2048x1536.jpg 2048w`, | ||
"width": 2560, | ||
"height": 1920, | ||
"placeholderUrl": `http://wpgatsby.local/wp-content/uploads/2022/02/sasha-set-GURzQwO8Li0-unsplash-300x225.jpg`, | ||
"internal": { | ||
"contentDigest": `5fa24d43c7fc603f9016933ad6bb3ee4`, | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.