Skip to content

Use images with relative paths in social cards (Twitter / OpenGraph / ArticleCard component) #25

@TysonMN

Description

@TysonMN

I want to use a square image as a hero image. Something with a side length of about 600px. However, it doesn't work very well now. The Hero component enlarges the provided image until the width matches the width of the browser window. I would prefer if the image is left at its original size and is instead horizontally centered. However, if the image were too large, then I think I would want the image shrunk to fit though. I don't think I ever want an image to be made larger.

Every hero image I have seen @loreanvictor use comes from unsplash, which includes an API for specifying what size the image should be. See this for an example. This has put the image-sizing burden on unsplash, so the Hero component hasn't needed to deal with images that are not perfectly sized.

Can the Hero component center the image given to it instead of enlarging it?

If you want to keep the current behavior, can options be added to the Hero component to support both the current behavior and the behavior like I want?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions