Title: Image-Src not https with custom size
Last modified: May 31, 2018

---

# Image-Src not https with custom size

 *  Resolved [sledolter](https://wordpress.org/support/users/sledolter/)
 * (@sledolter)
 * [8 years ago](https://wordpress.org/support/topic/image-src-not-https-with-custom-size/)
 * hi,
 * today I worked on a customers website, yesterday I installed a letsencrypt-ssl-
   certificate on that webspace and had to remove an alias from developing, after
   that all image-urls where broken cause of pointing directly to the old URL.
 * so today I rebuild the missing logos and after that I noticed that the “green
   lock”-symbol in firefox was not there any more, instead it shows me “mixed content”
   error.
 * after some investigations I noticed, that all image-sources from the image widget
   where “custom size” was set had only “http” in the src-tag, after changing all
   back to “full size”, handling the sizes with css and reload in browser the src
   had https at the beginning and the green lock was back.
 * maybe this helps you to find a bug?
 * peace,
    steef

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

 *  [Ed](https://wordpress.org/support/users/erishel/)
 * (@erishel)
 * [8 years ago](https://wordpress.org/support/topic/image-src-not-https-with-custom-size/#post-10362711)
 * Hey there **[@sledolter](https://wordpress.org/support/users/sledolter/)**!
 * Thanks for reaching out.
 * Mixed content warnings normally happen when there are still links pointing towards
   non-SSL images and other content. It can happen site wide, not just with Image
   Widget.
 * There’s a few steps you can take to fix this problem:
    1. Install [WordPress SSL](https://wordpress.org/plugins/wordpress-https/) – If
       using CloudFlare, use [Flexible SSL](https://wordpress.org/plugins/cloudflare-flexible-ssl/)
    2. Check Settings → General to see if you are still pointing towards http://
    3. Search your code for src=http and see if any instances exist
    4. Make sure your theme and menus are not calling for any sources from the non-
       SSL url
 * Hope that helps!
 *  [Ed](https://wordpress.org/support/users/erishel/)
 * (@erishel)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/image-src-not-https-with-custom-size/#post-10463241)
 * Hey there,
 * Since this thread has been inactive for a while, I’m going to go ahead and mark
   it as resolved. Don’t hesitate to create a new thread any time you help again!
 * Ed 🙂
 *  [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * (@lenasterg)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/image-src-not-https-with-custom-size/#post-10731988)
 * If you still having problems with https and image-widget, then you can use the
   following code into your theme’s functions.php.
 *     ```
       function ls_ssl_image_urls($url, $post_id) {
   
         list($protocol, $uri) = explode('://', $url, 2); 
         return 'https://'.$uri;
       }
       add_filter('image_widget_image_url', 'ls_ssl_image_urls', 10, 2);
       ```
   
 * Bests
    Lena

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

The topic ‘Image-Src not https with custom size’ is closed to new replies.

 * ![](https://ps.w.org/image-widget/assets/icon-256x256.png?rev=2489603)
 * [Image Widget](https://wordpress.org/plugins/image-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/image-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-widget/reviews/)

## Tags

 * [no ssl](https://wordpress.org/support/topic-tag/no-ssl/)

 * 3 replies
 * 3 participants
 * Last reply from: [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/image-src-not-https-with-custom-size/#post-10731988)
 * Status: resolved