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

Should be able to add image to Twitter card without it being a large image #84

Closed
GarthDB opened this issue May 10, 2016 · 11 comments · Fixed by #225
Closed

Should be able to add image to Twitter card without it being a large image #84

GarthDB opened this issue May 10, 2016 · 11 comments · Fixed by #225

Comments

@GarthDB
Copy link

GarthDB commented May 10, 2016

The standard summary card has a twitter:image property as well.

It's nice to use it for the site logo on cards that don't have large images.

@DirtyF
Copy link
Member

DirtyF commented May 10, 2016

@GarthDB @pathawks Should we support two different custom front matter variables page.large_image and page.image in order to allow this?

https://github.com/jekyll/jekyll-seo-tag/blob/master/lib/template.html#L153

@GarthDB
Copy link
Author

GarthDB commented May 10, 2016

I was thinking an image in the site config would be a nice default for standard summary cards, but a per post property might be good as well.

@mderriey
Copy link

mderriey commented Aug 25, 2016

I've just started using jekyll-seo-tag and it's great, thank you so much for that!

The best option for me would be to be able to choose on a per-post basis whether to use a standard summary card or a summary_large_image card.

If that's too hard, then @GarthDB's suggestion looks good, too.
I understand it this way:

  • if an image is specified for the post, use a summary_large_image card
  • if an image is not specified for the post, fall back to a summary card and use the site-wide image for the thumbnail

I'll be happy to submit a PR for that, though I will need a bit of guidance as I've never used Ruby before.

Cheers!

@daviddarnes
Copy link
Member

I've noticed this issue has been open for a while. For anyone looking for a workable, yet awful, workaround you can do the following:

{% capture seo %}
    {% seo %}
{% endcapture %}

{{ seo | replace: "summary_large_image", "summary" }}

@benbalter
Copy link
Collaborator

Could the folks on the thread advocating for the feature describe their use case a bit more? When would you provide an image and not want it large? Is it just a matter of personal preference? Is it because you're setting a default image on all pages? What's the downside to the image being large in all cases, etc.?

@mderriey
Copy link

mderriey commented Oct 4, 2016

For me, I'd like a large image when I have a specific image for a specific post. If I don't have one, I feel like a small image with the site logo is enough.

@daviddarnes
Copy link
Member

In my case I'm using it for my personal site, and the Twitter card image is my profile picture. So I encounter 2 main problems:

  • My face appears huge when I post my site to Twitter
  • The large summary image is landscape and therefore crops a square profile picture quite badly

The 'regular' summary image card for Twitter is better designed for square images without much detail, so having the option certain pages would be great.

@GarthDB
Copy link
Author

GarthDB commented Oct 5, 2016

Some screenshots might help this discussion:

Here's the standard image:
image

Here's the large image:
image

Twitter's description of the large image card is: The Summary Card with Large Image features a large, full-width prominent image alongside a tweet. It is designed to give the reader a rich photo experience, and clicking on the image brings the user to your website.

I agree with @mderriey and @daviddarnes on use cases @benbalter.

@schoenwaldnils
Copy link

Any updates on this? I had to use @daviddarnes workaround.

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@BlythMeister
Copy link
Contributor

Not sure how to request this to be re-opened but this is still an issue as your forced to have a large Twitter card as soon as you put an image.

I've put a PR in with a proposed "fix" whereby at a site level you can specify you don't want large cards.
This may be better at a post level, but since the workaround was at site level, this seemed reasonable.

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