Title: Specify og:image
Last modified: April 18, 2019

---

# Specify og:image

 *  Resolved [Inje](https://wordpress.org/support/users/inje/)
 * (@inje)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/)
 * Hello, i’ve just switched to SEO Framework from Yoast and i have to say i’m impressed
   so far!
 * I’ve managed to move all settings to SEO Framework, the only thing i don’t know
   how to do is how to make the plugin use a specific size for og:image.
 * I have created an image size in my functions:
    `add_image_size( 'fn-og', 1200,
   630, true ); // Hard Crop Mode`
 * Now i want to make the plugin to use that specific image size for og:image.
 * With yoast i could do this:
 *     ```
       add_filter( 'wpseo_opengraph_image_size', 'ac_wpseo_image_size', 10, 1 );
   
       function ac_wpseo_image_size( $string ) {
   
       	return 'fn-og';
   
       }
       ```
   
 * is there an alternative function for the SEO Framework?
    -  This topic was modified 7 years, 1 month ago by [Inje](https://wordpress.org/support/users/inje/).

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

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/#post-11444622)
 * Hello!
 * I’m glad you like the plugin!
 * Now, I haven’t ever tested this, but I believe this should do what you want:
 *     ```
       add_filter( 'the_seo_framework_og_image_args', function( $args ) {
   
       	$args['size'] = 'fn-og';
   
       	return $args;
       } );
       ```
   
 * Please note that I’m about to overhaul the image generation functions, and I’ll
   dump that filter aside for newer and better ones. What this yields and whether
   this change will directly affect the filter above is still to be determined. 
   For more information, see [this GitHub issue](https://github.com/sybrew/the-seo-framework/issues/403).
 * Moreover, note that Facebook and other social networks already crop the image
   for you. So, it’s essentially wasted space on your server to do this preemptively.
 *  Thread Starter [Inje](https://wordpress.org/support/users/inje/)
 * (@inje)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/#post-11445875)
 * Hello Sybre, first of all thank you for your reply, but that didn’t work 🙁
 * The reason i want to do this is because i apply a watermark on fn-og, to be shown
   as a shared image on facebook. It has nothing to do with the image size.
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/#post-11448905)
 * Hi again, Inje,
 * I rechecked the code, and the filter above only works when the image is taken
   from a default WordPress field; specifically, the featured image field.
 * Unfortunately, for any other fields, hijacking the image size isn’t easy. The
   image file selection and our custom cropper (which we had to reroute due to a
   bug in WordPress) handle this only once for the best size available for Facebook(
   4096×4096), and then it’s no longer processed; which significantly improves performance.
 * Now, you could look into a custom function that reroutes The SEO Framework’s 
   custom fields to your watermarked images at the moment a post is saved or updated.
   But, I doubt this is worth your time–especially since I’m going to rework the
   image generation process in the next update.
 * With that said, I will keep your use-case scenario in mind for the next version.
   May I be able to add something of use for you there, then you’ll find it in the
   updated API docs, which will be released together with the new version. Don’t
   forget to reach out to me after v3.3.0’s release so that I can help you with 
   this–ETA northern hemisphere’s summer.
 * I added a comment to the issue as a reminder: [https://github.com/sybrew/the-seo-framework/issues/403#issuecomment-485052163](https://github.com/sybrew/the-seo-framework/issues/403#issuecomment-485052163)
 * I’m sorry I can’t help you any further on this part right now! The software’s
   almost at its peak, and this is the final piece that needed necessary work… I’m
   ultimately glad you bumped into this issue before I started reworking! 🙂
 *  Thread Starter [Inje](https://wordpress.org/support/users/inje/)
 * (@inje)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/#post-11448951)
 * Glad i could “help” 🙂
 * Thank you for your work. I will wait for an update.

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

The topic ‘Specify og:image’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Inje](https://wordpress.org/support/users/inje/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/specify-ogimage/#post-11448951)
 * Status: resolved