admin管理员组文章数量:1356294
I'm working on a project made on Vite, now there is this Product card and when I click on it, it redirects to a Product Detail component where an API is hit to fetch the data of that product, and I'm getting the id from url params.
Now i have this requirement that when the product detail page is shared on whatsapp, the image incoming from the api data should be displayed as a preview image.
I'm also using react-helmet async, and providing the image url to it but it is not working as whatsapp crawlers dont execute javascript.
Can I somehow pre-render the html in vite with the image incoming from API data? something like SSR or SSG? At this point, it's too late to switch to Next js or some other framework. I just want to send the image along with the page url in whatsapp, tried sending separate image as a single message as well but that didnt work as well.
Please help me as I want to get it done with this project, this is currently the last concern. Thank you
本文标签: reactjsSSR in Vite for dynamic whatsapp ogimageStack Overflow
版权声明:本文标题:reactjs - SSR in Vite for dynamic whatsapp og:image - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744010221a2575427.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论