How can I make uploaded images in the editor load with HTTPS?

This should do it: add_action(‘admin_notices’, ‘https_the_content’); function https_the_content() { global $post; if(!$post->post_content) return; //change src to use the current url scheme $post->post_content = str_replace(array(“src=\”http://”, “src=”http://”), array(“src=\”//”, “src=”https://”), $post->post_content); return $post->post_content; }

Form Post results in 404 Not Found [duplicate]

I figured it out. Turns out that using the field name was the culprit. It appears that name and other field names like attachment, attachment_id, etc will cause WordPress to produce a 404 error. There’s a whole list of reserved terms in the Codex.