By davidwalsh
via davidwalsh.name
Published: Jan 31 2012 / 23:51
If you troll page markup like me, you've no doubt seen the use of data URI's within image src attributes. Instead of providing a traditional address to the image, the image file data is base64-encoded and stuffed within the src attribute. Doing so saves a network request for each image, and if you're the paranoid type, can prevent exposure of directory paths. Since creating data URIs is incredibly easy, let me show you how to do it with PHP.
Tweet
SaveShareSend
Tags: css-html, javascript, php, web design



Add your comment