-
Notifications
You must be signed in to change notification settings - Fork 93
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
next-sanity/image does not appear to be fully using hotspot #1647
Comments
I guess this technically could have been a bug report as well but 🤷🏼♂️ |
Any library using |
@coreyward does sanity-image expose a loader that can be used with next/image? I’m mainly doing some experimenting after the livestream with Lee and Knut. |
A loader is just a function that generates the URLs for your image. Since sanity-image exports both This said, I don't believe Next provides you any way to pass the the hotspot and crop values to your loader. They don't even let you pass in the height of the image. It's a hyper-constrained, ridiculously convoluted system that treats devs with kid gloves, all for an exorbitant fee. |
Is your feature request related to a problem? Please describe.
I had originally been using
sanity-image
which was good. However, after the livestream with Knut and Lee, I wanted to try usingnext/image
with a loader for Sanity images. Digging through this repo I found that there wasnext-sanity/image
. So I went to implement it as pretty much a drop in replacement forsanity-image
. However, I noticed that sometimes it used the hotspot and sometimes it didn'tDescribe the solution you'd like
It would be nice if I didn't have to crop and it could just use the hotspot.
Describe alternatives you've considered
Well as described above, I used
sanity-image
.Additional context
An example where I needed to crop in order to get a hotspot
Before cropping my image BUT still have the hotspot
After cropping the image with same hotspot
An example where I didn't need to crop in order to get a hotspot
Image in the network tab
Display in a card element
How I am using the component
The text was updated successfully, but these errors were encountered: