I need to convert an image to base64 encoding. I know its very easy with canvas. but the problem is that it should also run in IE8. but IE8 dont support HTML5 so i can\'t do it
There are some answers given here
How can you encode a string to Base64 in JavaScript?
have you tried any of them?
Simple answer is no if this needs to be done on client side. The canvas element is the only way to convert an image to bitmap data or data-uris (and even then security restriction may apply preventing this).
You can maybe get around this using Flash but of course that would require the client to have Flash installed.
Or setting up an external web service where you can upload the image and have it return the data you need.
For IE8 and lower there are no options out of the box (exCanvas gives you canvas drawing capabilities but can't provide bitmap data which is needed here). Basically, for IE8 you will need a server.