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
- The topic ‘Error when custom header is same as post thumbnail?’ is closed to new replies.