Support » Plugin: Unique Headers » Error when custom header is same as post thumbnail?

  • Hi, I’ve been using your plugin for a while now with great satisfaction! Thanks very much.

    Recently I’ve run into an issue which I believe could be caused by your plugin.

    I’m using Pagebuilder by SiteOrigin for a custom homepage. I’ve included a widget called Recent Posts Plus to display several of my recents posts with a 300×300 thumbnail of the post.

    I recently noticed that sometimes the thumbnail is not displayed correctly by the recent posts plus widget. The image URL is correctly set to imagename-300×300.jpg (which exists), but the srcset will say something like “imagename.jpg 300w, imagename.jpg 150w, imagename.jpg 96w” etc. This only happens for some images. Normally it will say “imagename-300×300.jpg 300w, imagename-150×150.jpg 150w” etc. like it should. The image then displays correctly.

    The recent posts plus widget however correctly uses get_the_post_thumbnail to fetch the thumbnail and I don’t believe it can be the fault of the widget in this case.

    This lead me to experiment a little bit and I noticed the problem disappeared when I changed my custom header image for the specific post, which was set to the same image as the featured image. I believe the problem could be that there is a function within your plugin to filter the srcset of custom header images, and since my featured image is also the custom header image, the srcset of the featured image is also filtered by the plugin.

    Could this be the case and if so, would there be anything you could do to fix it? (For example to check that you only really filter the custom header image?)

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ryan Hellyer

    (@ryanhellyer)

    This is a fascinating bug you’ve potentially found there. I don’t have time to tackle this immediately, but I’ve given myself a note to deal with this in the next day or two. If I don’t respond here, feel free to pester me as this sounds like something which should be fixed.

    Hi Ryan,

    thanks a lot for your reply. I hope you’ll have a chance to have a look at this. Thanks in advance,
    Joff19

    Hi Ryan! Since you asked me to pester you, here I am 😉 I still hope you could have a lot at the issue.

    Thanks a lot in advance
    Joff

    Plugin Author Ryan Hellyer

    (@ryanhellyer)

    I tried to replicate this now, but failed. My test site has a page with a customer header set, and I injected the featured thumbnail into the content area. But that featured image has the correct URLs set, including for the srcset attributes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error when custom header is same as post thumbnail?’ is closed to new replies.