Skip to content

@astrojs/image should support sharp crop strategies such as attention to find high entropy spots to center on #4341

@jasikpark

Description

@jasikpark

What version of astro are you using?

1.0.5

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

astro-imagetools supported choosing the crop-strategy that sharp takes when cropping an image, https://sharp.pixelplumbing.com/api-resize#resize, which meant that an image of a lighthouse centered on the lighthouse, while now it simply naively cropped from the bottom and the right of the image, cutting off the lighthouse.

Original New

image

image

I realize that astro-imagetools is a community maintained library rather than a 1st party integration, but it'd be great to have feature parity to make migrating to @astrojs/image seamless

Link to Minimal Reproducible Example

https://codesandbox.io/s/astro-4341-9rp30y?file=/src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pkg: imageRelated to the `@astrojs/image` package (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions