Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter Card Images for Articles Are Occasionally Positioned Inconsistently #3802

Open
jessleenyc opened this issue Aug 22, 2019 · 15 comments
Open
Labels
external contributors welcome contribution is welcome!

Comments

@jessleenyc
Copy link
Contributor

Describe the bug
Sometimes, twitter card images aren't centered properly when the social card unfurls. This is likely happening on Twitter's end but we can also fix this if we crop the images ourselves through cloudinary.

@jessleenyc jessleenyc added the area: publishing experience issues related to an authors experience publishing. Tags, series, etc. label Aug 22, 2019
@jessleenyc jessleenyc added ruby external contributors welcome contribution is welcome! and removed area: publishing experience issues related to an authors experience publishing. Tags, series, etc. labels Aug 22, 2019
@michael-tharrington
Copy link
Contributor

michael-tharrington commented Aug 23, 2019

I spoke with @healeycodes who said it was cool to share a bit of info here...

Steps to reproduce the behavior

  1. Copy this URL: https://dev.to/healeycodes/solving-puzzles-with-high-performance-javascript-3o4k
  2. Go here: https://cards-dev.twitter.com/validator
  3. Run the URL in the card reader to see that it's left-aligned.

Expected behavior
Article cover images should always appear centered when being transformed into social card images.

Screenshots

Here's a picture of the left-aligned social image:

https://cl.ly/c2ff13627cf9/download/Image%202019-05-23%20at%2012.45.55%20PM.png

Here's another picture of a separate post by the same author with a similar cover image which centered correctly:

https://cl.ly/6bcbfb147f55/download/Image%202019-05-23%20at%2012.47.51%20PM.png

This post was originally left-aligned too - https://dev.to/healeycodes/my-experience-with-pair-programming-4c0a but I used a manual override to fix it.

Note: I don't think it necessarily only happens to this author; but, these are known examples. If I see it happen to another author, I'll report back.

@michael-tharrington
Copy link
Contributor

Just found another example of this here:

https://cl.ly/faff3a2d7a71/Image%202019-09-20%20at%2011.50.56%20AM.png

@henrikwirth
Copy link

henrikwirth commented Nov 25, 2019

image

Have the same happening to my articles. They are aligned to right side instead of center.

I guess there are two options to that:

  • Either you preprocess the image and give the user a cropping choice (focal point).
  • Or, you give an option to upload an extra image for twitter. Then the use can make sure it has the right 2:1 ratio.

The second one would probably much easier to implement.

@brentonhouse
Copy link

Another (possibly easier) option is to allow user to upload twitter card image. The aspect ratio that you use for headers on dev.to is different than most of the social media images to that is why it is appearing odd.

@maud-lv
Copy link

maud-lv commented May 6, 2020

Hello! This also affects my posts.
Here an example on Twitter
image

And on LinkedIn:
image
I second what brentonhouse said: uploading social media cards in our dev.to publications would probably solve this.

@kay-is
Copy link
Contributor

kay-is commented Jun 5, 2020

Seems like all the social media platforms (Twitter, Facebook, LinkedIn) use 19:10
only dev.to uses 12:5

So maybe dev.to should allow 19:10 for future posts?

@justin-schroeder
Copy link

Having the same issue on one of my recent posts.

Screen Shot 2020-06-18 at 4 13 49 PM

Personally I would love to see support for additional meta tags in the front matter. That way you could actually have a different cover image and social image. Would be nice to see support for:

og:image
twitter:image
twitter:card (defaults to summary_large_image, but would be nice to specify)

@viclafouch
Copy link

Having the same issue on my post published today (https://dev.to/viclafouch/build-a-complete-modal-component-with-react-hooks-2fk8)

Preview on Linkedin

image

@kay-is
Copy link
Contributor

kay-is commented Jun 24, 2020

Update: I found a social media manager (e-clincher) that allows me to extract images from a post, stuff I post with that manager doesn't fit 100% either, but at least its centered now.

@AdrianSandu
Copy link

I can also confirm the issue happening on Discord, Slack, and LinkedIn preview. For Twitter, I am usually creating my own separate image to avoid the issue.

For example, this is how my latest post on DEV renders in these three places:

Discord preview

image

Slack preview

image

LinkedIn preview

image

@kay-is
Copy link
Contributor

kay-is commented Jul 13, 2020

Anything we can do here?
This is rather irritating.

@cmgorton cmgorton removed the external contributors welcome contribution is welcome! label Feb 2, 2021
@cmgorton
Copy link
Contributor

cmgorton commented Mar 5, 2021

@jessleenyc any thoughts on this feature request? Do you think this should be labelled as a potential RFC?

@cmgorton
Copy link
Contributor

cmgorton commented Apr 8, 2021

Forem team needs to investigate:

  • how often is this happening?
  • what % of users are experiencing this issue?
  • is this a front end or back end issue?
  • is there tools available already that we can use to help with this issue?

@vaidehijoshi vaidehijoshi added the external contributors welcome contribution is welcome! label Apr 22, 2021
@cmgorton
Copy link
Contributor

cmgorton commented Nov 9, 2021

Since this issue has gone stale I am going to close it. If anyone would like to still implement this feature let me know and we can turn this issue into a discussion

@michael-tharrington
Copy link
Contributor

I wanted to reopen this one as it's something I hear occasionally reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external contributors welcome contribution is welcome!
Projects
None yet
Development

No branches or pull requests