Making WordPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1526 closed enhancement (fixed)

WordCamp Sites: Open Graph -- add default image fallback when there is no image in the post.

Reported by: jeherve's profile jeherve Owned by: iandunn's profile iandunn
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: has-patch
Cc:

Description

See discussion here: https://wordpress.slack.com/archives/events/p1453392084003279

We already have a default Open Graph Image Meta tag added on the home page, when you haven't set any Site Logo, or Site Icon on your site.

It would be nice to have a similar feature on single posts, when no image can be found in the post (none was inserted, and no featured image was defined).

The attached patch introduces 4 levels of fallback:

  1. Site Logo -- http://jetpack.me/support/site-logo/
  2. Site Icon -- https://make.wordpress.org/core/2015/07/27/site-icon/
  3. Header Image -- https://codex.wordpress.org/Custom_Headers
  4. Global default OG image -- that's already defined in jetpack-tweaks.php, it's a WordPress logo: https://s.w.org/images/backgrounds/wordpress-bg-medblue.png

One concern from our Slack discussion was the following:

Though many header images are PNGs which render transparency kinda weird on shares (especially twitter)

-- @marktimemedia

Attachments (2)

default-fallback-image.diff (2.0 KB) - added by jeherve 9 years ago.
Open Graph: add default image fallback when there is no image in the post.
default-fallback-image.2.diff (2.0 KB) - added by jeherve 9 years ago.
Open Graph: add default image fallback when there is no image in the post, proper diff

Download all attachments as: .zip

Change History (6)

@jeherve
9 years ago

Open Graph: add default image fallback when there is no image in the post.

@jeherve
9 years ago

Open Graph: add default image fallback when there is no image in the post, proper diff

#1 @jeherve
9 years ago

Please ignore the first patch, default-fallback-image.diff​, I messed up when creating that first diff.

#3 @iandunn
9 years ago

  • Owner set to iandunn
  • Resolution set to fixed
  • Status changed from new to closed

In 2447:

Jetpack Tweaks: Set the default Open Graph image on single posts.

Fixes #1526
Props jeherve

#4 @iandunn
9 years ago

Thanks Jeremy :)

I removed the fallback for a Jetpack Site Logo, since none of our themes support it.

Note: See TracTickets for help on using tickets.