【SSL】wordpressで画像メディアを投稿したらhttpになっていた。

簡単検索:目次/このページについて

wordpress保護されてない通信ですとでてしまうかた。
httpをhttpsに変更したけどhttpsに反映されないときは下記のコードをfunctio.phpにいれると
解決する場合があるかもしれない。

function fix_ssl_attachment_url($url) {
if(is_ssl()){
$url = preg_replace("/^http:/", "https:", $url);
}
return $url;
}
add_filter("wp_get_attachment_url", "fix_ssl_attachment_url");