-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaks Yoast SEO og:image #17
Comments
Hey @cyrillbolliger Yeah, I ran into the same issue. The issue is not only that there’s no With Timmy v14.0, Timmy will generate that image metadata just like it would for default WordPress images. So, to make it work, you have to:
|
Hi @gchtr Thanks for your lightning fast response. I just tested your proposed solution: It works if I regenerate the thumbnail. However if I upload a new image, it doesn't solve the problem. I still have to regenerate the thumbnail after uploading a new image in order to get it working. Grüess uf Winti ;) |
Hi @gchtr I found a workaround meanwhile, I'll post it here in case it helps someone else. It basically just adds the size 'large' again: add_filter( 'intermediate_image_sizes_advanced', function ( $metadata ) {
$metadata['large'] = array(
'width' => 1200, // some value that comforts facebook etc.
'height' => 0,
'crop' => false,
);
return $metadata;
}, 11 ); |
Hey @cyrillbolliger That’s a cool little workaround! Small note for myself and others: Using the
That’s strange! I just tested it, and when I drop an image in the Media menu in the backend, the meta data is generated. Timmy returns an empty array for So I have two questions for you:
Thinking of this, I could probably use the Liebi Grüess zrugg nach Bern 🇨🇭🙌 |
Gosh, I completely forgot this issue, I'm very sorry! As you edited the last response, it reappeared in my feed...
It works, if I upload the image as content image. However if I upload it in the social section of Yoast SEO metabox as facebook image, it doesn't. Neither if I upload it in the media library (if the Image isn't linked in the content elsewhere).
I tried to disable all except ACF and Yoast SEO, but it didn't make a difference. |
Issue
The removal of the image sizes automatically generated when uploading an image done here makes the wordpress function
image_get_intermediate_size()
always return the full size image. However, if the full size image is wider or higher than 2000px, Yoast SEO rejects it as an og:image. It would therefore be great, if the image sizelarge
would not be cleared out. Or the function would at least have a filter.Yoast SEO uses the
image_get_intermediate_size()
function here.How to reproduce it
Prerequisites: WordPress with Theme that uses Timmy and the Yoast SEO Plugin.
Create a post, navigate to the social section of Yoast SEO metabox and add a facebook image that is wider than 2000px. Visit the post (frontend) and inspect the source code. The meta property og:image is missing.
Then change the image to one that is smaller than 200px wide and inspect the source code again -> the meta property og:image is now here.
The text was updated successfully, but these errors were encountered: