Exploration - fetch og:image for feature
Currently works only for serverside rendering of a feature. For browser it would need a proxy to avoid CORS.
Eg. here:
-
https://osmapp-git-og-image-zbycz.vercel.app/node/313822575
-
https://osmapp-git-og-image-zbycz.vercel.app/node/11243721137
-
loads in SSR
-
blocked if clicked away and reclicked
TODO:
- how to set cookie in next response
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated |
|---|---|---|---|---|
| osmapp | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 18, 2023 at 10:43AM (UTC) |
This pr is old but I still think the feature would be a reliable source for images. Maybe we should wait for my pr #539 and then add this as another source? If you don't want to do it yourself I can also do it, including the proxy just let me know.
And also I think it would be way faster if we stream the html response instead of awaiting the entire page as the meta tags are usually at the top and the entire page can be huge.
Yes, you may take it. I think I will review #539 today.
This PR was waiting until we had the FeatureImages slider.
Also streaming/getting only first x bytes sounds good. This was only exploration.
btw, once you are implementing this, the proxy should return only the meta tags or the og:image url only, not the whole page.