I'm currently using sharepoint 2010 and I want to use base64 encoded images. They work fine on our development server, but when the server goes through the standard content-deployment process to our live server, the data uris get truncated. This seems like it might be getting caught in sharepoint's url limits.

Does anyone have any unique and/or preferably easy methods they have used to solve this problem and be able to use encoded images?


1 Answer 1


Don't know if this might help. Seems like IE 8 has some limitations on Base64 encoded images. https://stackoverflow.com/questions/10159500/internet-explorer-and-base64-image-display

  • Yeah, sadly that's not the case. I already had a fallback for IE8 and less. The problem is the images are being truncated down to 255 characters on the server and so it's not working on any browser.
    – Ben
    Commented Aug 8, 2012 at 4:50
  • How are you storing the Base64 string? and I'm also curious to why your using Base64 strings for images?
    – Robban1980
    Commented Aug 8, 2012 at 5:15
  • In css as background images for a few layout images/icons. It's a bit of a performance boost for small images as you don't need a separate request for them.
    – Ben
    Commented Aug 8, 2012 at 6:17
  • Doesn't sound like the small gain you will receive is worth the trouble your having trying to implement it in SharePoint (I think it's a SharePoint issue). I think you should look at CSS Image sprites instead. Then you have 1 request for the image file and it can be cached so it's only for the first visit to the site.
    – Robban1980
    Commented Aug 9, 2012 at 2:04
  • I actually use both methods. One of the main images I have encoded is about 7 icons in a single sprite that comes out to <5kb. I then encoded the sprite into my css for maximum performance. Unfortunately it does seem like encoding the image isn't going to work though.
    – Ben
    Commented Aug 9, 2012 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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