Automattic / Automattic/jetpack
Open Graph / Twitter Cards: respect max image size limits set by Facebook and Twitter
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Howdy!
When selecting which image to use for the `og:image` tag, and when we don't have a featured image, Jetpack will search through the post content, and a very large image will cause Facebook to choke because of their 8mb limit. Perhaps we could run the image through Photon (if active) with a maximum size, or look for a more suitable size available, even if the post contains the original.
I'm referring to [this block](https://github.com/Automattic/jetpack/blob/e6334ed2428f2220405cbabbf888b5191fb01126/functions.opengraph.php#L276).
Contributor guide
Research direction
Start in functions.opengraph.php at the linked block that selects an og:image when no featured image is available. Review how images are found in post content and compare the proposed Photon resizing or alternate-size approaches. Done means the selected image respects the stated Facebook and Twitter size limits without requiring a featured image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100