Automattic / Automattic/jetpack
Kickstarter: embed width is limited by content_width, but embed height is still calculated from width parameter
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
1. Add the following to a site with Jetpack and the Shortcodes module active:
`[kickstarter url="https://www.kickstarter.com/projects/laleiden/new-album-los-muertos-tambien-dejan-flores?ref=home_potd" width="3000"]`
2. The embed's width won't be 3000px, since the theme's `$content_width` value will stop that from happening. However, the embed's height is still calculated based on that width parameter:

3. Maybe we could do something like for YouTube, where we calculate the height based on the width?
https://github.com/Automattic/jetpack/blob/master/modules/shortcodes/youtube.php#L175
Contributor guide
Research direction
Start at the Kickstarter shortcode entry point in the Shortcodes module and compare its sizing logic with modules/shortcodes/youtube.php, the referenced example. Reproduce the supplied shortcode with a theme content width, then verify that the rendered width—not the requested width—controls the embed height.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100