og:image tag missing
-
I’m having an issue where when I try to share a post on twitter, its image isn’t picked. With some investigation, I found that the image isn’t picked by twitter as og:image is missing. I used string locator to find the plugin where other meta tags are added like <twitter:card> and reached to your plugin.
As a test I manually added an of:Image in the file and twitter started picking image. However, I couldn’t find a way to get the image of the URL. The only variables available seem to be $title, $id and $description. Is there a $variable which can give the image URL so that my og:image tag is dynamic? Or is there a better way to fix this? I’ve already gone through another similar article where yoast plugin was issue. I’m not using yoast.
-
This topic was modified 5 years, 11 months ago by
deepakaggarwal7.
The page I need help with: [log in to see the link]
-
This topic was modified 5 years, 11 months ago by
-
Hi, @deepakaggarwal7.
Please access Settings > Help > Support > data button. Click on that, copy and send me the data.
Here you go! Thx
Featured Image from URL:3.0.4; WordPress:5.4.2; Site:https://www.deepakaggarwal.net; Theme:AccessPress Mag; PHP:7.2.31; WooCommerce:; Pages:4; Posts:19; Products:; Images without Dimensions:; URLs with Metadata:0; URLs:4; php-curl:yes; Plugins: - AccessPress Social Counter (aps-counter) - AccessPress Social Icons (accesspress-social-icons) - AccessPress Social Share (accesspress-social-share) - Akismet Anti-Spam (akismet) - Code Syntax Block (code-syntax-block) - Contact Form 7 (contact-form-7) - Featured Image from URL (featured-image-from-url) - Google Analytics for WordPress by MonsterInsights (google-analytics-for-wordpress) - Google XML Sitemaps (sitemap) - Hello Dolly () - Kirki Customizer Framework (kirki) - List category posts (list-category-posts) - Newsletter (newsletter) - Page Builder by SiteOrigin (siteorigin-panels) - Page Links To (page-links-to) - Posts in Sidebar (posts-in-sidebar) - Raw HTML (raw-html) - Scroll Triggered Boxes (scroll-triggered-boxes) - Site Kit by Google (google-site-kit) - String Locator (string-locator) - UpdraftPlus - Backup/Restore (updraftplus) - wpDiscuz (wpdiscuz) - WP TFeed (accesspress-twitter-feed); Active Plugins: - accesspress-social-counter - accesspress-social-icons - accesspress-social-share - akismet - code-syntax-block - contact-form-7 - featured-image-from-url - google-site-kit - google-sitemap-generator - kirki - list-category-posts - newsletter - page-links-to - posts-in-sidebar - raw-html - scroll-triggered-boxes - siteorigin-panels - string-locator - updraftplus - wpdiscuz; fifu_auto_alt:toggleon; fifu_class:toggleoff; fifu_clean_dimensions_all:toggleoff; fifu_column_height:64; fifu_confirm_delete_all:toggleoff; fifu_confirm_delete_all_time:; fifu_content:toggleoff; fifu_content_page:toggleoff; fifu_css:; fifu_data_clean:toggleoff; fifu_default_url:; fifu_dynamic_alt:toggleoff; fifu_enable_default_url:toggleoff; fifu_fake:toggleoff; fifu_get_first:toggleoff; fifu_grid_category:toggleoff; fifu_hide_cpt:toggleoff; fifu_hide_page:toggleoff; fifu_hide_post:toggleoff; fifu_image_height_arch:; fifu_image_height_cart:; fifu_image_height_ctgr:; fifu_image_height_home:; fifu_image_height_page:; fifu_image_height_post:; fifu_image_height_prod:; fifu_image_height_shop:; fifu_image_width_arch:; fifu_image_width_cart:; fifu_image_width_ctgr:; fifu_image_width_home:; fifu_image_width_page:; fifu_image_width_post:; fifu_image_width_prod:; fifu_image_width_shop:; fifu_jquery:toggleoff; fifu_lazy:toggleoff; fifu_media_library:toggleoff; fifu_original:toggleoff; fifu_ovw_first:toggleoff; fifu_pop_first:toggleoff; fifu_query_strings:toggleoff; fifu_run_delete_all:toggleoff; fifu_run_delete_all_time:; fifu_save_dimensions:toggleoff; fifu_save_dimensions_all:toggleoff; fifu_save_dimensions_redirect:toggleoff; fifu_social:toggleon; fifu_social_image_only:toggleoff; fifu_spinner_db:100; fifu_spinner_nth:1; fifu_wc_lbox:toggleon; fifu_wc_zoom:toggleon; Image: | https://media-exp1.licdn.com/dms/image/C5112AQHljMb5D3rDLA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=_Em25sy972M6plKHck7cFmsX5jiit9ZY_jRSRkwRLhQ |__ https://www.deepakaggarwal.net/?p=11 | https://media-exp1.licdn.com/dms/image/C5112AQEMFmqAegdqhQ/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=MgTS2IKln3a5HHkVkJyJDFY-f80tLlBvHfGh9HXCrgk |__ https://www.deepakaggarwal.net/?p=13 | https://media-exp1.licdn.com/dms/image/C4E12AQHxsH7Vh2C_fA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=-xhyraL0aEebixMPZwHZCsKu62QTiJT9d0OAMvXQOiA |__ https://www.deepakaggarwal.net/?p=15; Video:; Slider:;Please update to the latest version and let me know if that solves your issue, @deepakaggarwal7.
Hi
I’ve updated the plugin but the problem still persists. If you use Twitter Card Validator and copy the link of my post, twitter will not pick the image. When I view source, og:image tag is still missing.
Even after update, the content of your plugin doesn’t have an og:image tag.Following is the code I found.
<meta property="og:title" content='<?php echo $title ?>' /> <meta property="og:description" content='<?php echo $description ?>' /> <meta name="twitter:card" content='summary_large_image' /> <meta name="twitter:title" content='<?php echo $title ?>' /> <meta name="twitter:description" content='<?php echo $description ?>' />If I explicitly add an og:image with a hardcoded image URL, twitter picks it up. But I am clueless how to add og:image tag and featured image of the current post.
thanks for your help.
Hi, @deepakaggarwal7.
Now you have updated, please send me the support data again.
My bad. I should’ve copied it earlier. Here you go!
Featured Image from URL:3.1.2; WordPress:5.4.2; Site:https://www.deepakaggarwal.net; Theme:AccessPress Mag; PHP:7.2.31; WooCommerce:; Pages:4; Posts:19; Products:; Images without Dimensions:; URLs with Metadata:0; URLs:4; php-curl:yes; Plugins: - AccessPress Social Counter (aps-counter) - AccessPress Social Icons (accesspress-social-icons) - AccessPress Social Share (accesspress-social-share) - Akismet Anti-Spam (akismet) - Code Syntax Block (code-syntax-block) - Contact Form 7 (contact-form-7) - Featured Image from URL (featured-image-from-url) - Google Analytics for WordPress by MonsterInsights (google-analytics-for-wordpress) - Google XML Sitemaps (sitemap) - Hello Dolly () - Kirki Customizer Framework (kirki) - List category posts (list-category-posts) - Newsletter (newsletter) - Page Builder by SiteOrigin (siteorigin-panels) - Page Links To (page-links-to) - Posts in Sidebar (posts-in-sidebar) - Raw HTML (raw-html) - Scroll Triggered Boxes (scroll-triggered-boxes) - Site Kit by Google (google-site-kit) - String Locator (string-locator) - UpdraftPlus - Backup/Restore (updraftplus) - wpDiscuz (wpdiscuz) - WP TFeed (accesspress-twitter-feed); Active Plugins: - accesspress-social-counter - accesspress-social-icons - accesspress-social-share - akismet - code-syntax-block - contact-form-7 - featured-image-from-url - google-site-kit - google-sitemap-generator - kirki - list-category-posts - newsletter - page-links-to - posts-in-sidebar - raw-html - scroll-triggered-boxes - siteorigin-panels - string-locator - updraftplus - wpdiscuz; fifu_auto_alt:toggleon; fifu_class:toggleoff; fifu_clean_dimensions_all:toggleoff; fifu_column_height:64; fifu_confirm_delete_all:toggleoff; fifu_confirm_delete_all_time:; fifu_content:toggleoff; fifu_content_page:toggleoff; fifu_css:; fifu_data_clean:toggleoff; fifu_default_url:; fifu_dynamic_alt:toggleoff; fifu_enable_default_url:toggleoff; fifu_fake:toggleoff; fifu_get_first:toggleoff; fifu_grid_category:toggleoff; fifu_hide_cpt:toggleoff; fifu_hide_page:toggleoff; fifu_hide_post:toggleoff; fifu_image_height_arch:; fifu_image_height_cart:; fifu_image_height_ctgr:; fifu_image_height_home:; fifu_image_height_page:; fifu_image_height_post:; fifu_image_height_prod:; fifu_image_height_shop:; fifu_image_width_arch:; fifu_image_width_cart:; fifu_image_width_ctgr:; fifu_image_width_home:; fifu_image_width_page:; fifu_image_width_post:; fifu_image_width_prod:; fifu_image_width_shop:; fifu_jquery:toggleoff; fifu_lazy:toggleoff; fifu_media_library:toggleoff; fifu_original:toggleoff; fifu_ovw_first:toggleoff; fifu_parameters:toggleoff; fifu_pop_first:toggleoff; fifu_query_strings:toggleoff; fifu_run_delete_all:toggleoff; fifu_run_delete_all_time:; fifu_save_dimensions:toggleoff; fifu_save_dimensions_all:toggleoff; fifu_save_dimensions_redirect:toggleoff; fifu_social:toggleon; fifu_social_image_only:toggleoff; fifu_spinner_db:100; fifu_spinner_nth:1; fifu_wc_lbox:toggleon; fifu_wc_zoom:toggleon; Image: | https://media-exp1.licdn.com/dms/image/C5112AQHljMb5D3rDLA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=_Em25sy972M6plKHck7cFmsX5jiit9ZY_jRSRkwRLhQ |__ https://www.deepakaggarwal.net/?p=11 | https://media-exp1.licdn.com/dms/image/C5112AQEMFmqAegdqhQ/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=MgTS2IKln3a5HHkVkJyJDFY-f80tLlBvHfGh9HXCrgk |__ https://www.deepakaggarwal.net/?p=13 | https://media-exp1.licdn.com/dms/image/C4E12AQHxsH7Vh2C_fA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=-xhyraL0aEebixMPZwHZCsKu62QTiJT9d0OAMvXQOiA |__ https://www.deepakaggarwal.net/?p=15; Video:; Slider:; Shortcode:; REST Routes: - https://www.deepakaggarwal.net/wp-json/:PHP; - https://www.deepakaggarwal.net/wp-json/:JSThanks, @deepakaggarwal7.
Let’s try something:
1) access Settings > Metadata
2) enable Clean Metadata (it will be automatically disabled when finished)
3) enable Image Metadata (and keep it enabled, otherwise the plugin won’t with most themes and plugins).After that, let me know if the problem is still there.
It didn’t help. My ImageMetadata was disabled. As suggested, I enabled clean metadata and then enabled Image Metadata.
When I reload the web page, I still don’t see o:image tag. As long as it doesn’t get rendered, Twitter won’t pick image.
<meta property="og:title" content='How to convert ReactNative Project from FlowType to TypeScript' /> <meta property="og:description" content='' /> <meta name="twitter:card" content='summary_large_image' /> <meta name="twitter:title" content='How to convert ReactNative Project from FlowType to TypeScript' /> <meta name="twitter:description" content='' />Following is dump of data:
Featured Image from URL:3.1.2; WordPress:5.4.2; Site:https://www.deepakaggarwal.net; Theme:AccessPress Mag; PHP:7.2.31; WooCommerce:; Pages:4; Posts:20; Products:; Images without Dimensions:; URLs with Metadata:4; URLs:4; php-curl:yes; Plugins: - AccessPress Social Counter (aps-counter) - AccessPress Social Icons (accesspress-social-icons) - AccessPress Social Share (accesspress-social-share) - Akismet Anti-Spam (akismet) - Code Syntax Block (code-syntax-block) - Contact Form 7 (contact-form-7) - Featured Image from URL (featured-image-from-url) - Google Analytics for WordPress by MonsterInsights (google-analytics-for-wordpress) - Google XML Sitemaps (sitemap) - Hello Dolly () - Kirki Customizer Framework (kirki) - List category posts (list-category-posts) - Newsletter (newsletter) - Page Builder by SiteOrigin (siteorigin-panels) - Page Links To (page-links-to) - Posts in Sidebar (posts-in-sidebar) - Raw HTML (raw-html) - Scroll Triggered Boxes (scroll-triggered-boxes) - Site Kit by Google (google-site-kit) - String Locator (string-locator) - UpdraftPlus - Backup/Restore (updraftplus) - wpDiscuz (wpdiscuz) - WP TFeed (accesspress-twitter-feed); Active Plugins: - accesspress-social-counter - accesspress-social-icons - accesspress-social-share - akismet - code-syntax-block - contact-form-7 - featured-image-from-url - google-site-kit - google-sitemap-generator - kirki - list-category-posts - newsletter - page-links-to - posts-in-sidebar - raw-html - scroll-triggered-boxes - siteorigin-panels - string-locator - updraftplus - wpdiscuz; fifu_auto_alt:toggleon; fifu_class:toggleoff; fifu_clean_dimensions_all:toggleoff; fifu_column_height:64; fifu_confirm_delete_all:toggleoff; fifu_confirm_delete_all_time:; fifu_content:toggleoff; fifu_content_page:toggleoff; fifu_css:; fifu_data_clean:toggleoff; fifu_default_url:; fifu_dynamic_alt:toggleoff; fifu_enable_default_url:toggleoff; fifu_fake:toggleon; fifu_get_first:toggleoff; fifu_grid_category:toggleoff; fifu_hide_cpt:toggleoff; fifu_hide_page:toggleoff; fifu_hide_post:toggleoff; fifu_image_height_arch:; fifu_image_height_cart:; fifu_image_height_ctgr:; fifu_image_height_home:; fifu_image_height_page:; fifu_image_height_post:; fifu_image_height_prod:; fifu_image_height_shop:; fifu_image_width_arch:; fifu_image_width_cart:; fifu_image_width_ctgr:; fifu_image_width_home:; fifu_image_width_page:; fifu_image_width_post:; fifu_image_width_prod:; fifu_image_width_shop:; fifu_jquery:toggleoff; fifu_lazy:toggleoff; fifu_media_library:toggleoff; fifu_original:toggleoff; fifu_ovw_first:toggleoff; fifu_parameters:toggleoff; fifu_pop_first:toggleoff; fifu_query_strings:toggleoff; fifu_run_delete_all:toggleoff; fifu_run_delete_all_time:; fifu_save_dimensions:toggleoff; fifu_save_dimensions_all:toggleoff; fifu_save_dimensions_redirect:toggleoff; fifu_social:toggleon; fifu_social_image_only:toggleoff; fifu_spinner_db:100; fifu_spinner_nth:1; fifu_wc_lbox:toggleon; fifu_wc_zoom:toggleon; Image: | https://media-exp1.licdn.com/dms/image/C5112AQHljMb5D3rDLA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=_Em25sy972M6plKHck7cFmsX5jiit9ZY_jRSRkwRLhQ |__ https://www.deepakaggarwal.net/?p=11 | https://media-exp1.licdn.com/dms/image/C5112AQEMFmqAegdqhQ/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=MgTS2IKln3a5HHkVkJyJDFY-f80tLlBvHfGh9HXCrgk |__ https://www.deepakaggarwal.net/?p=13 | https://media-exp1.licdn.com/dms/image/C4E12AQHxsH7Vh2C_fA/article-cover_image-shrink_720_1280/0?e=1593648000&v=beta&t=-xhyraL0aEebixMPZwHZCsKu62QTiJT9d0OAMvXQOiA |__ https://www.deepakaggarwal.net/?p=15; Video:; Slider:; Shortcode:; REST Routes: - https://www.deepakaggarwal.net/wp-json/:PHP; - https://www.deepakaggarwal.net/wp-json/:JSHi, @deepakaggarwal7.
Could you send me a post that has an EXTERNAL featured image?
This one has an INTERNAL featured image:
https://www.deepakaggarwal.net/2020/06/11/how-to-convert-reactnative-project-from-flowtype-to-typescript/Hi again, @deepakaggarwal7.
I did some tests here and currently the og:image tag is only being added when you have an external featured image.
So I will make a change to add the og:image even when you have an internal featured image. I believe it will solve your issue.
Thanks. You seem to have banged on the problem. Thanks for your support.
Hi, @deepakaggarwal7.
The new version is ready. It will add og:image tags even for internal images. Let me know if that solves your issue.
THANK YOU SO MUCH @marceljm
It works like a charm now after update!
🙂For anyone having that issue, after update, please ensure to clean metadata.
thanks!Glad to hear it.
If you don’t have any other issue and all are working fine, please consider giving the plugin a nice review. Thanks!
https://wordpress.org/support/plugin/featured-image-from-url/reviews/
The topic ‘og:image tag missing’ is closed to new replies.