Fallback size in wpseo_opengraph_image_size
-
I’m using this filter to have Yoast choose a custom sized image for FB using this code:
function filter_wpseo_opengraph_image_size( $original ) { return "custom-size"; }; add_filter( 'wpseo_opengraph_image_size', 'filter_wpseo_opengraph_image_size', 10, 1 );
It works fine when the image selected by the user in the Facebook image area in the Yoast box of the Page has an image with the size “custom-size”. If the image does not have this size, then no og:image tag is outputted. How can I create a fallback size or let yoast show the default size if the image selected by the user doesn’t have a resolution of “custom-size”?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fallback size in wpseo_opengraph_image_size’ is closed to new replies.