Automattic / Automattic/jetpack
PBE: Images are overstretched
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
When inserting an image into a PBE-generated post (e.g. attaching a single image), the image is inserted to fit the `large` thumbnail size even when it is smaller the width.
Steps, assuming PBE is active with an e-mail created:
1. Send an e-mail to PBE attaching a smaller image (example: http://placehold.it/300x500 ).
2. View site.
Expected:
Image to load at full size (300x500 in this case)
Actual:
https://cloudup.com/c4Qi6ayXkCo
(using Twenty Ten, same with Twenty Fourteen)
HTML:
`
`
This occurs with Jetpack, works as expected with WordPress.com, perhaps due to the image classes being used for image sizing instead of set width/height attributes on WP.com.
Originally reported: http://wordpress.org/support/topic/images-too-big-posting-by-email?replies=3#post-5697902
Contributor guide
Research direction
Start with the PBE image-insertion flow and compare its generated HTML with the reported 300x500 example and the WordPress.com behavior. Confirm the fix by sending a smaller attached image and verifying that the post displays it at its original dimensions rather than the large thumbnail size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100