[wp-trac] [WordPress Trac] #34945: HTTPS website with HTTP images

WordPress Trac noreply at wordpress.org
Mon Jan 4 23:30:44 UTC 2016


#34945: HTTPS website with HTTP images
--------------------------------------------+--------------------------
 Reporter:  Angristan                       |       Owner:  johnbillion
     Type:  defect (bug)                    |      Status:  reopened
 Priority:  normal                          |   Milestone:  4.4.2
Component:  Media                           |     Version:  4.4
 Severity:  normal                          |  Resolution:
 Keywords:  https has-patch has-unit-tests  |     Focuses:
--------------------------------------------+--------------------------

Comment (by spigot):

 I'm not sure if this is any kind of help, but I had the same issue: all
 HTTPS site, but images added via the media button were marked up as http
 rather than https. I 'fixed' it with a filter:

 {{{
 add_filter( 'image_send_to_editor', 'force_media_protocol', 10, 9 );

 function force_media_protocol($content) {

   $content = str_replace(array('http://'), 'https://', $content);

   return $content;

 }
 }}}

 Sorry if this isn't a help, this is my first time posting on trac...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34945#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list