Title: Will it remove SSL request?
Last modified: August 21, 2016

---

# Will it remove SSL request?

 *  [Enterpr1se](https://wordpress.org/support/users/enterpr1se/)
 * (@enterpr1se)
 * [13 years ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/)
 * Hi,
 * I am using HTTPS Force SSL Administration in my site.
    When I add images, it 
   will show [https://domain.com/wp-contant/uploads/](https://domain.com/wp-contant/uploads/)
 * I found that this plugin just remove the http request part in small image
    when
   I insert a image, it will like this [<img class=”aligncenter size-medium wp-image-11604″ alt=”StartrekWallpaper” src=”//domain.com/wp-content/uploads/2013/05/StartrekWallpaper-640×383.jpg” width=”640″ height=”383″ />](https://domain.com/wp-content/uploads/2013/05/StartrekWallpaper.jpg)
 * Is there any setting to let it full relative URLs?
 * [http://wordpress.org/extend/plugins/relative-image-urls/](http://wordpress.org/extend/plugins/relative-image-urls/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Scott Werner](https://wordpress.org/support/users/scottwerner/)
 * (@scottwerner)
 * [13 years ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/#post-3767441)
 * When you insert an image, the url should appear as this:
    _src=”/wp-content/uploads/
   2013/04/thumbs-up-1.jpg”_
 * I’m not 100% sure on your question. Do you want it to remove the //domain.com
   part?
 *  [rhertzog](https://wordpress.org/support/users/rhertzog/)
 * (@rhertzog)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/#post-3767507)
 * I have the exact same problem… as he said, the initial URL submitted by the media
   browser starts with https:// because we’re using SSL to protect the administrative
   area (everything in /wp-admin/).
 * So you need to strip https:// in addition to http://
 * Replace `str_replace("http://","",$imageurl);` with `preg_replace("/^https?:\/\//","",
   $imageurl);`
 * In fact this is my use case for this plugin. I don’t want to hardcode https://
   in URL because I want visitors to load the pictures with the same protocol that
   they used to load the page that they are visiting. My SSL certificate is self-
   signed and browsers won’t load pictures from self-signed https servers when they
   are visiting a non-https page.
 *  [rhertzog](https://wordpress.org/support/users/rhertzog/)
 * (@rhertzog)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/#post-3767508)
 * Just to be clear, obviously the part “//domain.com” is completely wrong in the
   URL that he gets. It’s the hostname of the original URL and it shouldn’t end 
   up in the relative URL.
 * Also the plugin doesn’t work when the URL of the link is different from the URL
   of the displayed image (quite a common case):
 * I get this for instance:
    `<a href="https://badminton-sorbiers.fr/files/2013/
   07/photo-bad.jpg"><img src="/files/2013/07/photo-bad-174x300.jpg" alt="photo 
   bad" width="174" height="300" class="aligncenter size-medium wp-image-1064" /
   ></a>`
 * instead of the expected
 * `<a href="/files/2013/07/photo-bad.jpg"><img src="/files/2013/07/photo-bad-174x300.
   jpg" alt="photo bad" width="174" height="300" class="aligncenter size-medium 
   wp-image-1064" /></a>`
 * So maybe you need to also take care of the replacing what you find in the href
   attribute…
 *  Thread Starter [Enterpr1se](https://wordpress.org/support/users/enterpr1se/)
 * (@enterpr1se)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/#post-3767510)
 * Hi,
 * The output is
 * `<a href="https://www.enterpr1se.info/wp-content/uploads/2013/05/Yahoo_HK_Enterpr1se.
   png"><img class="aligncenter size-medium wp-image-12255" alt="Yahoo_HK_Enterpr1se"
   src="//www.enterpr1se.info/wp-content/uploads/2013/05/Yahoo_HK_Enterpr1se-640x305.
   png" width="640" height="305" /></a>`
 * I expect the result should be
 * `<a href="/wp-content/uploads/2013/05/Yahoo_HK_Enterpr1se.png"><img class="aligncenter
   size-medium wp-image-12255" alt="Yahoo_HK_Enterpr1se" src="/wp-content/uploads/
   2013/05/Yahoo_HK_Enterpr1se-640x305.png" width="640" height="305" /></a>`

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Will it remove SSL request?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/relative-image-urls_d2cdcc.svg)
 * [Relative Image URLs](https://wordpress.org/plugins/relative-image-urls/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relative-image-urls/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relative-image-urls/)
 * [Active Topics](https://wordpress.org/support/plugin/relative-image-urls/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relative-image-urls/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relative-image-urls/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Enterpr1se](https://wordpress.org/support/users/enterpr1se/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/will-it-remove-ssl-request/#post-3767510)
 * Status: not resolved