-
Notifications
You must be signed in to change notification settings - Fork 27.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asset download during nextjs export #10147
Comments
This is covered by #9524 |
@Timer sorry for the late response. but this is NOT covered by #9524 . In fact, i was told there to open a new issue since this will not be considered for inclusion under SSG improvements. Is it possible to do this using any kind of custom code, etc ? this is the only thing blocking us from moving entirely to Nextjs from Gatsby. |
hi guys, |
@Timer - any chance you can take a look at this and comment ? if there's a way to do this using the existing Nextjs framework, that would be awesome as well. |
Any news on this? Ideally this should just store images fetched during getStaticProps on .next/static/images like the rest of the images of the website. The fetching will only happen on build time (getStaticProps), so this shouldn't be a problem technically. |
I think it should also avoid duplicate downloads and allow post processing of whatever was downloaded afterwards. |
Any news on this? |
In my case my headless CMS is internal-only, and only accessible during the build process, currently I'm having to hack together a solution to copy the uploads folder from the headless CMS into my build export's It'd be awesome, if NextJS could handle fetching these assets during the build for me, including potentially doing the image optimizations that are already available during the build. |
Same issue for us. The CMS is private.
We would love this feature.
…On Thu, 11 Feb, 2021, 11:49 Daniel Eck, ***@***.***> wrote:
In my case my headless CMS is internal-only, and only accessible during
the build process, currently I'm having to hack together a solution to copy
the uploads folder from the headless CMS into my build export's out
folder so that the URLs provided by the CMS can be accurate.
It'd be awesome, if NextJS could handle fetching these assets during the
build for me, including potentially doing the image optimizations that are
already available during the build.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAASYUZGXQAMGSJI57D7OWLS6NZIRANCNFSM4KIQRIBA>
.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Feature request
A related conversation to this feature happened here #9524 (comment)
if i use a headless CMS (even wordpress or graphcms or whatever), the asset url is used in the static html.
There are two preferences here - that asset links be used as such.
But more likely - download the asset, build the html (link to it locally) and then layer a CDN in front. This is the far more acceptable practice.
This also ties in very well with using deployment systems like Netlify - which have a far, far more suitable globally available infrastructure than something like DatoCMS or Graphcms. So if im using Netlify as deployment, i would want everything to be served from Netlify domain and let it work its magic.
We understand that this increases build times. This is ok for our usecase where we use a CMS just for the sake of usability, but deployment has to follow guidelines of compliance (geographic restriction of assets, etc) so we would like the entire build to be inside the export folder. This would mean that CMS that have CDN in front of it (e.g. datocms and www.datocms-assets.com which is Imgix) may not be ideal.
There are tons of similar requests.
https://spectrum.chat/next-js/general/how-would-you-handle-importing-remote-images-on-nextjs-static-export~30b2ba84-bc27-4da7-9ec8-21e4d5d287a3
on gatsby side as well - gatsbyjs/gatsby#14076
https://spectrum.chat/gatsby-js/general/adding-remote-images-during-node-creation~e704e6fb-24b2-46c6-b1fc-93189d2e28a4
https://github.com/njosefbeck/gatsby-source-stripe/#downloading-files
The text was updated successfully, but these errors were encountered: