WordPress 4.4 appears to have a bug where images added through the editor in Visual Composer (TinyMCE?) are not URL-encoded. This cause errors on image paths with spaces when WP automatically generates the
Due to plugin/theme incompatibilities I can’t upgrade to a newer version of WP (yet) but was wondering if anybody has run into this before and knows a fix. The fix has to happen in PHP when the page is saved because otherwise WordPress generates a
srcset attribute which is also invalid, eg:
srcset cannot be “safely” ignored by the browser like in
src because spaces are a delimiter between URLs and sizes.
Read more here: Get WordPress to URL-Encode Image uploads