facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.77k stars 26.86k forks source link

Auto cropping once Vercel deploy my app #12685

Open Lighterchu opened 2 years ago

Lighterchu commented 2 years ago

Hi Team,

I have a storefront where all images look fine on the local side of the project and images fit and all that good stuff. However, once I take it and deploy it to vercel, for some reason I found the images have been cropped and changed around. The client I am working for needs to have the whole image in the product cards and not cropped. They are a photographer that needs to have images shown to the fullest. I really hope someone knows how to stop the auto-cropping or can show me the light on this issue

( DEV Server )

Screen Shot 2022-08-19 at 5 06 11 pm

( Vercel Deploy Server )

Screen Shot 2022-08-19 at 2 12 17 am

I have done alot of changes in the app and tried to work it ou myself, but nothing I do help when it comes to images as something built into the deploy change the image scale and crops it

DiviyamPathak commented 2 years ago

I think it would be better if u post this in proper format with your code then it would be a lot insightful. but got your problem.

DiviyamPathak commented 2 years ago

take a look at this article it should help you https://vercel.com/docs/concepts/image-optimization

Lighterchu commented 2 years ago

Hi Diviyam,

So I am using Vercel as the hosting services and I am using the framework of Hydrogen, how ever ever think crystal clear on the local, but when I deploy it to Vercel, it gets cropped. I dont have any built in functions of Vercel

PeterNelsonT commented 2 years ago

is this even related to cra?