[Support request] srcset 2x is always HTTP when site is HTTPS

Home Forums Support [Support request] srcset 2x is always HTTP when site is HTTPS

Home Forums Support srcset 2x is always HTTP when site is HTTPS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1972444
    Wil

    I have an SVG logo set in the customizer > site identity > logo

    The entire site is HTTPS and has been since it was created.
    The URL of the logo in the media library is HTTPS.

    However, wherever I visit the site in mobile and only mobile, the logo is output as HTTP in the srcset for x2 and this cases an protocol serving error as the request expects everything in HTTPS, therefore the logo is not displayed.

    Here is the srcset for mobile, you can see the very last 2x image has the HTTP protocol instead of HTTPS.

    <img class="header-image is-logo-image" alt="company-name" src="https://company-name.local/wp-content/uploads/2021/09/company-name-logo-blue.svg" title="company-name" srcset="https://company-name.local/wp-content/uploads/2021/09/company-name-logo-blue.svg 1x, http://company-name.local/wp-content/uploads/2021/09/company-name-logo-blue.svg 2x" width="302" height="79">

    I’ve set all elements to draft status so they are not interfering.
    I’ve activated the GeneratePress theme directly (I have a child theme) and the same thing happens.

    Is this a bug?

    Wil.

    #1972595
    David
    Staff
    Customer Support

    Hi there,

    thats odd – was the retina logo uploaded and added to the site before the SSL was enabled ?

    The simplest fix is to NOT add an Retina logo – SVGs don’t require retina unless they have an <img> embedded within them ( checking your logo it does not ), as they don’t have a fixed pixel density.

    #1973184
    Wil

    Just FYI, there was no retina image in the customiser.

    As soon as I added one the issue disappeared, however, it looks like there may be a bug if there is no retina image loaded.

    #1973362
    David
    Staff
    Customer Support

    GP won’t add the Retina src-set unless a retina logo was added at some time.
    The only ‘glitch’ is if a logo was there and either later removed from the Media Library or its URL/Slug was changed – then you see an empty field in the customizer, when there is actually an image there. Which may have been the case here.

    You should be able to remove the retina logo now and it should remove it from the src-set.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.