Skip to content

Post Images: always use real image dimensions in OG Tags#3114

Merged
dereksmart merged 1 commit intomasterfrom
fix/og-image-width-height-big-no-photon
Dec 8, 2015
Merged

Post Images: always use real image dimensions in OG Tags#3114
dereksmart merged 1 commit intomasterfrom
fix/og-image-width-height-big-no-photon

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Dec 8, 2015

When Photon is active, it resizes very large ($too_big) images to be 1200x1200px. It also adjusts og:image:width and og:image:height to use these new values.
When Photon isn't active on the other hand, wp_get_attachment_image_src returns the original image. og:image:width and og:image:height shouldn't be updated to 1200x1200.

Reported here:
https://wordpress.org/support/topic/publicize-featured-image-problem-on-facebook

When Photon is active, it resizes very large (`$too_big`) images to be 1200x1200px. It also adjusts `og:image:width` and `og:image:height` to use these new values.
When Photon isn't active on the other hand, wp_get_attachment_image_src returns the original image. `og:image:width` and `og:image:height` shouldn't be updated to 1200x1200.

Reported here:
https://wordpress.org/support/topic/publicize-featured-image-problem-on-facebook
@jeherve jeherve added Bug When a feature is broken and / or not performing as intended [Feature] Sharing Post sharing, sharing buttons [Feature] Publicize Now Jetpack Social, auto-sharing Team I/O [Status] Needs Review This PR is ready for review. labels Dec 8, 2015
@jeherve jeherve added this to the 3.8.2 milestone Dec 8, 2015
@jeherve
Copy link
Copy Markdown
Member Author

jeherve commented Dec 8, 2015

Related: 1bdffc8

@samhotchkiss samhotchkiss added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Dec 8, 2015
dereksmart added a commit that referenced this pull request Dec 8, 2015
…g-no-photon

Post Images: always use real image dimensions in OG Tags
@dereksmart dereksmart merged commit 465e829 into master Dec 8, 2015
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Dec 8, 2015
@dereksmart dereksmart deleted the fix/og-image-width-height-big-no-photon branch December 8, 2015 22:42
jeherve added a commit that referenced this pull request Dec 9, 2015
Like on WordPress.com.
Error introduced in #3114
georgestephanis pushed a commit that referenced this pull request Apr 12, 2017
When Photon is active, it resizes very large (`$too_big`) images to be 1200x1200px.
It also adjusts `og:image:width` and `og:image:height` to use these new values.
When Photon isn't active on the other hand, wp_get_attachment_image_src returns the original image. `og:image:width` and
`og:image:height` shouldn't be updated to 1200x1200.

Merges #3114 and #3116

Merges r131877-wpcom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Publicize Now Jetpack Social, auto-sharing [Feature] Sharing Post sharing, sharing buttons Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants