• Resolved sledolter

    (@sledolter)


    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)
  • Hey there @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 – If using CloudFlare, use Flexible SSL
    2. Check Settings → General to see if you are still pointing towards https://
    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!

    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 ??

    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.