Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do you think the use of image data URI is SEO friendly?

On the one hand saves you a HTTP request. On the other hand it really messes up your code. Especially for image files larger than 20KB or moving GIF image files of up to 200KB, the quantity of code inserted is enormous. As Googlebot reads usually from top to bottom, all data after the image data URI encoding will be harder to rank well in Google.

Consider that image data URI is not in the CSS files as they should normally be and for the time being I can use only TinyMCE editor which provides me with just two options, either insert image with the image data URI method or the traditional image link.

I would like to know which is more search engine friendly.

share|improve this question
Also note that, "Base64-encoded binary data is approx 1.37 times the original data size" (Wikipedia Base64) so not only are your pages larger, you are in fact transmitting more data and potentially using more bandwidth (gzip encoding may reduce this?). Also, IE8 reportedly has a DATA URI size limit of 32KB (approx 23KB image file size). So, it's probably only practical for small images. – w3dk Jan 4 '14 at 12:05
When using mod_deflate to gzip compress the pages that you send, the Base64 data gets shrunk back down considerably. It is still larger, but only by a very small amount, certainly not by 1.37. – Stephen Ostermiller Jan 5 '14 at 10:46

Using data URI images in the page does make the page much larger and that can be a slight problem for search engine bots.

I have a website with a few small images on each page. Users typically view only one page of the site where they can find their answer. Because of this, I inline everything on the page. The JavaScript files are inline, the CSS files are inline, and the images are data URI.

Older versions of browsers (notably Internet Explorer 7 and earlier) don't support data URI images. Two percent of my users still use these browsers, and I still support them on this site. As such, I put in user agent tests to determine whether browsers support data URI. I conditionlly serve data URI only to browsers that support it.

Initially I was giving all bots the data URI images. When I did so, I noticed that Webmaster Tools reported that my page size went up dramatically and that Googlebot started crawling fewer pages on my site because of it. After that, I changed the user agent test to treat all bots like older versions of IE. Now bots and older browsers get the image links and modern browsers get the data URI.

If you implement data URI for your images, check your crawl rate in Google Webmaster Tools afterwards. Ensure that Googlebot is still crawling enough pages on your site that it will be able to keep up with the changes you make to your site.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.