Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Let TwitterImage type depend on image size #150

Closed
IreneStr opened this issue Mar 27, 2019 · 1 comment
Closed

Let TwitterImage type depend on image size #150

IreneStr opened this issue Mar 27, 2019 · 1 comment

Comments

@IreneStr
Copy link
Contributor

IreneStr commented Mar 27, 2019

As discussed in the UX channel, we want to let the size of the uploaded image determine what type of TwitterImage we show.

Docs about summary card with large image:

Images for this Card support an aspect ratio of 2:1 with minimum dimensions of 300x157 or maximum of 4096x4096 pixels.

To do:

  • Images with minimum dimensions of 300x157 should result in a summary-large-image type.
  • Smaller images should result in a summary type.

NB.

  • Don't worry about the aspect ratio. If the aspect ratio is far off, that would result in a strange preview which should prompt the user to use another image.
  • We'll deal with too large images (> 4096x4096) in a later stage.
  • The summary-large-image card itself has an 506x254 image. That means that images between 300x157 and 506x254 are going to be stretched out in Twitter. We want to replicate this behavior in our preview. Later, we will add a notification with a warning in those cases.

Parent #28

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant