Loader option `fit` does not work
See original GitHub issueDescribe the bug
When I try to load an image which is rectangular and crop it to square:
<Image
alt=""
options={{
fit: ImageFit.COVER,
}}
responsive={[
{
maxWidth: 800,
size: {
height: 800,
width: 800,
},
},
]}
src="https://images.unsplash.com/photo-1655241459367-c95abd34d0bc"
/>
It does not work, the image is distorted, it is not cropped. This part in url &width=800&height=800&fit=cover does not give me anything. On the other hand it works on unsplash (&fit=crop&w=500&h=500&q=80): https://images.unsplash.com/photo-1655241459367-c95abd34d0bc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=500&h=500&q=80
What I do wrong? 😃
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Try to create <Image /> with option fit: ImageFit.COVER. Inspect the image. It is not cropped.
Expected behavior
When we use fit: ImageFit.COVER and provided size of an image is different from its own ratio - it should be cropped.
Screenshots or Videos

Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Doesn't work with webpack 2 · Issue #92 - GitHub
Hello guys. Looks like it doesn't works with the latest webpack 2 beta. loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract({ ...
Read more >"You may need an appropriate loader to handle this file type ...
All my index.js file is doing is importing react, but it seems like the 'babel-loader' is not working. I am using 'babel-loader ......
Read more >Extending with Loaders - SurviveJS
The next question is how to pass a file name to the loader. Passing options to loaders#. To demonstrate passing options, the runner...
Read more >FS19 - Fitting a front loader attachment - GIANTS Software
I've got a Claas Arion 610 tractor and FL140 front loader attachment but for the life of me I can't get the trigger...
Read more >Loaders | Android Developers
Loaders make it easy to asynchronously load data in an activity or fragment. Loaders have these characteristics: There are multiple classes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@tomekrozalski Just wanted to mention that I incorporated changes into the latest releases of js-image-lib and Remix-Image to support
fitandpositionin pureTransformer, so they can be used on all environments, not just those that support using Sharp