• Resolved falondrian

    (@falondrian)


    Hello, I use these filters to select the facebook/twitter image sizes:

    – wpseo_opengraph_image_size
    – wpseo_twitter_image_size

    However, when the attachment doesn’t exist, yoast doesn’t output anything. Instead it should fallback to the full image size.

    Similar topic: https://www.ads-software.com/support/topic/fallback-size-in-wpseo_opengraph_image_size/. It was closed with the comment ‘You or your developer could add an if/else statement that checks if the image has a custom size before returning the custom size.’. However, this is not possible because these filter calls don’t receive any parameters – I would need the image link in order to decide on a fallback myself.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Suwash

    (@suascat_wp)

    @falondrian

    As much as we hate to say it, your question goes beyond the technical expertise of me and my colleagues on the Yoast support team. This means we can’t give you a solid answer to your question.

    But we don’t want to leave you empty-handed either, that’s why we’ve created our developer portal at developer.yoast.com. This has proven to be useful to many developers in the past, and hopefully will serve you well too.

    Sorry we can’t be of more help here.

    Thread Starter falondrian

    (@falondrian)

    Hello suwash,

    well kind of, I had to replace my two lines of code by 100 (!) lines to solve my issue by using custom presenters. I would be much happier if you could forward my request to your developers as a bug report because it really is not a good default behavior (after a fix I could go back to my 2 lines). Technically the real issue is how yoast selects the correct image attachment which is really not very sophisticated. If yoast selected the right attachment by its size (facebook 1200×630, twitter 1024×512 for large card) I wouldn’t need any custom code at all.

    Pcosta88

    (@pcosta88)

    Hi @falondrian!

    We understand when your image has custom sizes Yoast is not outputting anything when you use that filter. This is an issue!

    Our developers are aware of this issue. We have an open report on Github here https://github.com/Yoast/wordpress-seo/issues/10863. We suggest commenting on it so you may be kept aware of any updates. You may need an account in order to comment.

    • This reply was modified 4 years ago by Pcosta88.
    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fallback size for custom social media image filters’ is closed to new replies.