Skip to content

Limit width of alignwide and alignfull images to original image width. #12044

Closed

Description

Describe the bug
When an image is uploaded and set to alignwide or alignfull, the block stylesheet does not respect the intrinsic width of the image leading to the image potentially being displayed wider than its actual pixel size. This is unexpected behavior which can lead to images appearing blurry / crusty / having artifacts.

To Reproduce
Steps to reproduce the behavior:

  1. Add relatively wide image (ie 800px)
  2. Align wide or full
  3. Display on wide screen and see the image appear wider than its intrinsic width

Expected behavior
The display of images aligned alignwide or alignfull should "max out" at the intrinsic width of the uploaded image.

Related tickets and PRs
See WordPress/twentynineteen#630 and WordPress/twentynineteen#638 to get a practical breakdown of the problem and a simple CSS solution.

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions