• Hi,

    I’m trying to add a base64 image to a WordPress page with wp_update_post().

    The string I’m trying to insert looks like:

    <img src="data:image/jpeg;base64,...." alt="foo" class="bar">

    Now wp_update_post seems to truncate the colon and anything before it until the double quote (ie: ‘date:’), resulting in:

    <img src="image/jpeg;base64,...." alt="foo" class="bar">

    Thus breaking my image. However, this does work if I manually update the page.

    I’ve found some people having similar problems with styles caused by KSES, but I can’t seem to figure out a solution for this specific issue.

    Does anyone have a suggestion?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_update_post and base64 images’ is closed to new replies.