• Resolved brokkr

    (@brokkr)


    I recently switched my whole wordpress site to https after getting certificates from let’s encrypt. Using 4.3.1 all content was https.

    After upgrading to 4.4 images no longer load and the browser complains about mixed content. Instead of an image I get a filename printed out. Inspecting the filename-element in Chrome or Firefox gets me this:

    <img width="984" height="615" src="https://brokkr.net/wp-content/uploads/2015/11/22100041369_591b31367d_b_enigma1-984x615.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="22100041369_591b31367d_b_enigma1" srcset="https://brokkr.net/wp-content/uploads/2015/11/22100041369_591b31367d_b_enigma1-300x188.jpg 300w, https://brokkr.net/wp-content/uploads/2015/11/22100041369_591b31367d_b_enigma1.jpg 1024w, https://brokkr.net/wp-content/uploads/2015/11/22100041369_591b31367d_b_enigma1-984x615.jpg 984w" sizes="(max-width: 984px) 100vw, 984px">

    As you can see, the image’s src is correctly set to https, whereas the srcset attribute is un-encrypted. Is this a bug or do I need to tweak a setting?

    I would like for the srcset attribute to use https as well. If not, or while waiting for a fix, I would like to disable the attribute.

    Thanks in advance.

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thank you for this… How absurd of me to think updating to wordpress 4.4 would go smoothly… smh.. for noobs (such as myself) please remember to add the <?php and ?> tags within the above specified functions.

    Yo have to add the code on your functions.php theme file.

    <?php
    function wpdf_ssl_srcset( $wpdf_sources ) {
    if (is_admin()) {
    foreach ( $wpdf_sources as &$wpdf_source ) {
    $wpdf_source[‘url’] = set_url_scheme( $wpdf_source[‘url’], ‘httpp’ );
    } // fin boucle sur les images
    } // fin test si dans l’administration
    return $wpdf_sources;
    }
    add_filter( ‘wp_calculate_image_srcset’, ‘wpdf_ssl_srcset’ );
    ?>

    Thanks Chris, SSL Insecure Content Fixer fixed it for me too!

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Responsive images: src url is https, srcset url is http -> no images loaded’ is closed to new replies.