Image in text widget does not update

  • Unknown's avatar

    I have a StackOverflow flair on one of the right column text widgets.

    The code is like

    <a href="http://stackoverflow.com/users/702361/phoxis">
    <img src="http://stackoverflow.com/users/flair/702361.png?theme=clean" width="208" height="58" alt="profile for phoxis at Stack Overflow, Q&A for professional and enthusiast programmers" title="profile for phoxis at Stack Overflow, Q&A for professional and enthusiast programmers">
    </a>

    Which works fine. But I have noticed in recent days the StackOverflow scores does not change anymore. The image in question is http://stackoverflow.com/users/flair/702361.png, which is not a static image, and therefore not cache-able.

    It seems that wordpress.com caches the image. When I look at the web page source code, I see the following code for the same widget.

    <a href="http://stackoverflow.com/users/702361/phoxis">
    <img src="https://i0.wp.com/stackoverflow.com/users/flair/702361.png" alt="profile for phoxis at Stack Overflow, Q&A for professional and enthusiast programmers" title="profile for phoxis at Stack Overflow, Q&A for professional and enthusiast programmers" width="208" height="58">
    </a>

    Note that the img src has changed to

    https://i0.wp.com/stackoverflow.com/users/flair/702361.png

    from

    https://stackoverflow.com/users/flair/702361.png

    And this is why the image does not update. I have tried to remove the code and re-add, but no help.

    I think there is something going on in the backend, possibly optimization?

    Can anyone help me on this?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi @phoxis – WordPress.com has been caching offsite images with Photon CDN for quite a while now. No way to turn it off.

    https://wordpress.com/plugins/

    Jetpack

  • Hi there,

    The reason why those particular links are being cached is because they are served over http, not https. If we don’t do this caching you would get mixed content warnings on your site, and on browsers with more aggressive security settings the site would be blocked completely.

    If Stackoverflow adds an SSL certificate for their domain (which I’m rather surprised to see they haven’t done), and you can use the https URL for that site, the image should update if you change it at the source.

    But we can’t disable this caching, as @justjennifer also said.

  • Follow-up – A colleague informs me Stackoverflow does have SSL, but they don’t redirect http links for some reason, so if you update those links to your image to https rather than http, it might cause the image to update again.

  • Unknown's avatar

    Thanks for that very important additional information, @kokkieh. Bookmarked! :)

  • Unknown's avatar
  • Unknown's avatar

    @justjennifer I was aware of that and was finding to just update the image, but thanks for the info. @kokkieh , understood the situation, thanks for the udpate. Although the images seemed to update itself (did the cache update? Or you guys made some changes?). I have changed the links to https now. Really appreciate moderators and engineers replying to this issue. It is great to see WordPress.com as maintained the quality user support. Thank you very much.

  • @phoxis

    It’s possible that the cache was refreshed at some point, but I know the photon cache that serves http images over https doesn’t update very often. I do see now that you are using the https link we’re serving that link instead of the i0.wp.com link, so changes to the image should update from here on out.

  • The topic ‘Image in text widget does not update’ is closed to new replies.