Trying to generate dynamic plaiceholders in a server component.
Answered
Brown bear posted this in #help-forum
Brown bearOP
I'm trying to generate dynamic placeholders in a server component. In the development environment, it works fine, but when deployed to Vercel, the page often gives a 504 Gateway Timeout error. I think this may be due to generating over 100 images at a time. Are there any workarounds for this?
Answered by B33fb0n3
Are there any workarounds for this?dont generate over 100 images at a time. Focus on the most important directly visible images and generate them for these. That should solve the 504 gateway timeout
12 Replies
Brown bearOP
Are there any workarounds for this?dont generate over 100 images at a time. Focus on the most important directly visible images and generate them for these. That should solve the 504 gateway timeout
Answer
American Chinchilla
Another work around is to use physical base64
And referende them from there
Reference*^
So you would convert your images to base64 and use that string value
@Brown bear solved?
@American Chinchilla Another work around is to use physical base64
Brown bearOP
example?
for now i have placed static blurdataurls for those images.
@Brown bear example?
when looking though this project you will see, that they do it with a placeholder: https://github.com/vercel/platforms/blob/main/app/%5Bdomain%5D/page.tsx#L58