有没有办法索引“Next/Image Component”生成的图像?在谷歌图片搜索中?
我在索引由 Next/Image 组件优化的图像时遇到问题,这些图像位于我的 Next.js 应用程序的公共文件夹中。
我还没有看到任何例子,其中由 Next/Image 组件生成的任何资源/URL(如下所示)已在谷歌图像搜索中建立索引。
这种类型的 URL: https://www.example.com/_next/image?url=%2Fimages%2Fhome%2FDog-image-1.jpg&w=384&q=100
这些的原因尽管 http 标头中具有资源内容类型: image/jpg ,但图像并未在 google 中编入索引,因为 google 需要在根文件/资源/URL 位置抓取资源,如下所示: https://www.example.com/images/home/Dog-image-1 .jpg
为什么? http 标头是否具有正确的内容类型?因为google需要确保它知道原始资源,因为它不确定Next/Image生成的URL将保留多长时间,并且它希望在其图像索引中避免此类URL或base64以避免404错误搜索引擎要保持满意的用户体验,就需要直接抓取其所在位置的图片资源,并且必须在html代码中抓取。
现在的问题是:
在使用 Next/Image 组件时,如何让 google 抓取我的 img 标签中的根资源/URL。如果这是不可能的,那么 Next/Image 根本不适用于电子商务或其他依赖大量图像搜索流量的图像相关网站,甚至其他网站也不愿意通过这些 URL 共享您的图像。
任何人都认为 data-src 属性可以解决这个问题或这里的问题 https: //nextjs.org/docs/api-reference/next/image#minimum-cache-ttl?
感谢您抽出时间。
I am having issues with indexing the images that are optimized by the Next/Image component these images are in the public folder of my Next.js app.
I haven't seen any examples where any resource/URL like below, that was generated by Next/Image component has been indexed in google image search.
This type of URL: https://www.example.com/_next/image?url=%2Fimages%2Fhome%2FDog-image-1.jpg&w=384&q=100
The reason that these images are not getting indexed in google despite having the resource content-type: image/jpg in http header is because google needs to crawl the resource at the location root file/resource/URL like this: https://www.example.com/images/home/Dog-image-1.jpg
Why? If the http header has the correct content-type? Because google needs make sure that it knows the original resource because it is not sure how long the URL that is generated by Next/Image will stay, and it wants to avoid these kind of URL's or base64 in its image index to avoid 404 errors in the search engine to maintain a satisfactory UX, so it needs to crawl the image resource at it's location directly and it has to crawl it in the html code.
Now the question:
How is it possible to make google crawl the root resource/URL in my img tag when using the Next/Image component as well. If that's not possible Next/Image is not at all for e-commerce or other image dependent websites that depend on a lot of traffic from image search, even other websites would be reluctant in sharing your images via these URLs.
Anybody thinks a data-src attribute can solve this or something here https://nextjs.org/docs/api-reference/next/image#minimum-cache-ttl?
Thank You for Your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用 https://nextjs.org/docs/api-reference/ 做到了下一个/图像#未优化
因此我有常规图像 URL https://www.example.com/images/home/Dog-image-1.jpg< /a>
I did it using https://nextjs.org/docs/api-reference/next/image#unoptimized
And as a result I have regular image URL https://www.example.com/images/home/Dog-image-1.jpg