I needed to serve some WordPress posts as web views to some mobile apps. But the app guys wanted the all the images inside the_content to be encoded into base64-strings, for offline caching. This was made into a tiny little plugin which you can download and use as you see fit.
When enabled, this plugin will encode all images sitewide on your website. This is generally a bad idea. Should you need help tweaking the plugin further, just drop me an email.
Download the plugin here.
UPDATE: This plugin is now released at the WordPress Plugin Directory. Download the plugin here.
1 thought on “Base64-encoding media assets in WordPress”
I am trying to modify it to encode ing urls in a variable not just in $content via apply filters.
I am also posting this on wordpress.org since I can’t see an option to subscribe to the comment thread here.
Comments are closed.