[gatsby-source-filesystem] createRemoteFileNode replaces original filename with hash
See original GitHub issueIf files are downloaded through createRemoteFileNode the original filename is replaced by digest.
The problem is that if you download images you lose the descriptive filenames (a similar issue has already been fixed in gatsby-plugin-sharp #2752).
Would it be possible to append the original filename to digest? I know thatpath.parse(url).ext
could be replaced with path.parse(url).base
in gatsby-remote-file-node.js, however I’m not sure how this will work in cases such as #2985.
Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
gatsby-source-filesystem
gatsby-source-filesystem A Gatsby source plugin for sourcing data into ... The helper tries first to retrieve the file name and extension by parsing...
Read more >gatsby-source-filesystem | Yarn - Package Manager
A Gatsby source plugin for sourcing data into your Gatsby application from your local filesystem. The plugin creates File nodes from files. The...
Read more >Replace special filename characters - DoubleLoop
Description Many source plugins use createRemoteFileNode to download files from CMSs and other sources. Windows has many reserved characters ...
Read more >Gatsby Changelog | 5.3.0
In the PR feat(gatsby-worker): Show original stack trace we have now given ... gatsby-source-filesystem : Replace special filename characters, via PR #34249 ...
Read more >Gatsby - fetching remote images with createRemoteFileNode
I've been trying to fetch images from remote URL to Gatsby Source File system, to take advantage of lazy ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any documentation describing how to use createRemoteFileNode and also about how it works? I wanted to know the best method to handle files and images from a headless CMS while working on a gatsby-source plugin. @calcsam @nik-s @KyleAMathews
As pointed out in #2306, descriptive image file names containing keywords are important for SEO.
Plugins such as gatsby-source-wordpress download media from remote sources using createRemoteFileNode (I see now that gatsby-source-wordpress is the only one working like that at the moment?).
Thanks!