Support » Requests and Feedback » Media uploader – why force HTTP?

  • Resolved zygmoont


    Hi guys,
    I just cannot understand it – why on earth is WP media uploader always uploading the images with HTTP protocol? It only causes problems. Why not use the universal “//”, which causes the content to load within the currently used protocol? // instead of forced protocol

    Or another option – don’t include the whole protocol and domain in the source address at all, just use the “/” in the beginning of source address and link it from the root directory. It would be /wp-content/uploads/2014/01/pic.jpg instead of the full http path.

    More and more sites are using SSL mainly because the big sites are now serving their content only through HTTPS protocol. The SSLs are getting cheaper and many sites are offering their website in both versions. WordPress limiting itself only to one specific protocol is a little problematic.

    Do you know any plugin that could modify the uploader output url? Or any hook I could use to simply string replace every http:// to //?

    P.S. I am not interested in modifying the website output (if is_ssl() -> replace http with https) – that’s what I am doing right now. I am looking for a universal solution performed during uploading the picture, not displaying it.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    You’ll also need this:

    Many things will be set to the URL of your site, which actually is the real issue. WordPress only does ONE base URL at a time. You’re https or not, never both, so in so far as it cares…. It’s not needed.

    The plugin answer is I believe you’d need to fork this – – and have it replace instead of remove.

    Thank you, the Relative Image URLs plugin should do it. Or maybe I will just stay with converting src="http:// to src="https:// on if is_ssl() on the post output. Anyway, I am surprised that so few people have problem with https mixed content, based on the number of threads on the internet and the popularity of this kind of plugins, which is minimal.

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Well most of us just use https all the time, or not. And if you set WP up to be https from the get go, it’s pretty much all just fine.

    zygmoont, I’m with you, truly weird that the image uploader doesn’t just do the // prefix. Due to Google adding SSL-or-not to their algo just a few days ago, I just converted a huge content site over to https. Due to the lame image uploader, I now have to use a plugin search-replace to get shed of all those http prefixes or else I don’t get the mythical green padlock. And typical of the WordPress scene these days, it took me three hours of activating and testing to find a search/replace plugin that actually worked with latest version of WordPress. It’s all a big mess, I’m not impressed. MTN

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Media uploader – why force HTTP?’ is closed to new replies.