-
Notifications
You must be signed in to change notification settings - Fork 22
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 is not being cropped at right area #24
Comments
I have encountered a similar problem. When I specify
the resulting url is In the Sanity documentation for fit, the table states |
Also #32 |
Running in to this using the Helpers file:import { createImageUrlBuilder, } from 'next-sanity';
const config = {...}
export const urlFor = (asset) => createImageUrlBuilder(config).image(asset); Usage within a component:const imageUrl = urlFor(asset).width(300).height(1200).fit('crop').auto('format');
// The resulting "imageUrl" is cropped to the right height and width, but doesn't respect the focus point? Examples with an actual image in our studio:How the image is cropped in the studio: Cropped image with w=300&h=900 |
stumbled upon the same issue -> the focal point is not passed out of the box you have to pass it manually.
so IMHO this is not a bug. but would be helpful to add an example in the documentation |
If this isn't a bug, then this part of the docs should be corrected:
|
Following this up although I know this was a while ago... Any outcome for this? I'm currency experiencing the same issues where the URL builder is not respecting hotspots (crop works fine though). Anyone get this to work? |
Hello Sanity Team ,
I have the following issue:
At the documentation says that the crop and hotspot values are respected when using
but when I get the image it does not get cropped on at the right position, it does not respect the hotspot or the crop settings.
it generates this rect values
rect=0,612,4898,2041&w=1920&h=800
Also the values from sanity and gatsby are different!
graphql values from sanity deployment
gatsby source values
GROQ values
I think there is a bug, or maybe I'm doing something wrong.
Let me know if you need more details
Thanks!
Miguel Angel
The text was updated successfully, but these errors were encountered: