问题原文
原帖链接 · lucaswxp · CC BY-SA 4.0
I was wondering if google can crawl image like this:
<img src="data:image/png;base64..." title="relevant title" alt="relevant alt" />
I found this link that says no: Base64 encoded images and availability of their metadata for Googlebot
But it's been 6 years since that post, and I was wondering if things had changed. I want to provide the best user experience for my users, but not at the cost of my ranking.
In my case I have more than 3 million pages which all have "small" images that I would like to embed/inline to increase initial performance of page load, but also these images are well ranked on images and search, I don't want to loose that.
已采纳解答
原帖链接 · Nina Dubovich · CC BY-SA 4.0
This comes directly from Google's Image Best Practices document which I assume is up to date and current.
Supported image formats
Google Images supports images in the following formats: BMP, GIF, JPEG, PNG, WebP, and SVG.
You can also inline images as Data URIs. Data URIs provide a way to include a file, such as an image, inline by setting the src of an img element as a Base64 encoded string using the following format:
<img src="data:image/svg+xml;base64,[data]">While inlining images can reduce HTTP requests, you should carefully judge when to use them since it can considerably increase the size of the page. For more on this, refer to the section on pros and cons of inlining images on our Web Fundamentals page.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
