I am creating a service using WCF and I need to send images. I looked around how this is done and found that Base64 encoding is often used to send binary data as text. Is it good practice to send images (~ 500 kb)?
This is a really great message, but yes, if you have to send them, base 64 is the way to go. If you only have .net clients, you can look at binary message encoding to reduce the size down.
Base64 safely encodes binary data, this will be fine. Just keep in mind that the transfer size is approximately 30% larger.
Why do you need to send binary data as text? HTTP can send binary data, why not make your image available via HTTP and send the URL to your WCF service?
We sent images / files via WCF using byte arrays up to several MB in size.
You can use MTOM for large files. Cm:
http://developers.de/blogs/damir_dobric/archive/2008/02/02/wcf-mtom-binary-data-transmission.aspx