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

[image-url] Crop-rect applied even when images don't have hotspot #48

Open
evenwestvang opened this issue Jan 25, 2018 · 2 comments
Open
Labels
bug Something isn't working

Comments

@evenwestvang
Copy link
Member

Typical query:

.fit(‘max’).height(350).width(1000)

generates a crop even when the image does not have a hotspot. User needs to pass ignoreParams to avoid behaviour.

@evenwestvang evenwestvang added the bug Something isn't working label Jan 25, 2018
@evenwestvang evenwestvang removed the bug Something isn't working label Oct 5, 2018
@bjoerge bjoerge added the bug Something isn't working label Nov 6, 2018
@aaronadamsCA
Copy link

For anyone like me finding that this is still an issue 2.5 years later (!), here's the aforementioned workaround, so you don't need to dig around in the docs:

imageBuilder
  .image(logo)
  .ignoreImageParams() // Workaround for sanity-io/image-url#48
  .width(120)
  .height(120)
  .fit("clip")
  .url()

@rexxars rexxars changed the title [image-url] Crop-rect applied even when images don't have hot spot [image-url] Crop-rect applied even when images don't have hotspot Mar 19, 2021
@rexxars rexxars transferred this issue from sanity-io/sanity Dec 14, 2022
@coreyward
Copy link

I think this is due to the same issue as in #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants