Closed spencerwooo closed 8 months ago
Also interested in this! @spencerwooo have you found a solution by any chance?
I also use Notion as my blog CMS. I find that the images sometimes don't load because they are expried. Therefore, I use a cronjob to regenerate the SSG pages.
The cronjob will load the sitexml and request to revalidate each path, and finally, request each page to make sure the generation is complete.
It works well currently.
I am also interested in an elegant solution; I am not sure forcing the SSG pages to regenerate is good, but maybe by finding a way for NextJS to consider an image is the same as previously without the need to optimize it?
Hey y'all, this is what we're doing for now: https://github.com/railwayapp/blog/pull/18
@FarazPatankar I think this issue was resolved 🥳
Hey y'all, this is what we're doing for now: #18
This solution is very elegant and works great! Thanks :pray:
Hi there, apologies for posting this random question here, but I was curious about how you overcame the issue for rendering images hosted on Notion and also using
next/image
for optimisation? (As I myself ran into a similar problem when switching to Notion's public API for blog hosting.)next/image
would have to optimise a whole lot of images with different URLs while they are still the same one in reality - leading to an email from Vercel telling me that I have gone over my limit for image optimisation.It was not until Next.js 12.1 (released literally yesterday) before we could on-demand ISR with webhooks (On-demand Incremental Static Regeneration). So I was curious about if you had some solutions to this issue without on-demand ISR?
My workaround was that I had to resort to using
getServerSideProps
without image optimisation for serving fresh images. But I skimmed through your repo and found that you were still usinggetStaticProps
, and hence this question ;)And thanks for the awesome railway.app, I'm loving it!