Skip to content

[gatsby-plugin-sharp] Fluid image with specified aspect ratio #11851

@missmatsuko

Description

@missmatsuko

Summary

Is there a way to force a crop/aspect ratio using fluid?
I want to create a set of image cropped to squares to use as thumbnails.
I could use resize, but that only provides one src with the exact height and width provided.
I could use fixed, which is a bit better because it creates srcs for different pixel densities, but that doesn't consider the image could be displayed at different sizes depending on the viewport.

Relevant information

https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/

Environment (if relevant)

File contents (if changed)

gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions