#How to CROP an Image before uploading to DB?

7 messages · Page 1 of 1 (latest)

open cairn
#

Help, i'm trying to force an image to be 1:1 ratio before uploading to DB.. how can I achieve that?

I was trying with react-easy-crop but I'm having a lot of issues, I believe is not compatible with Next Js

Thanks!!

long shell
#

or use css, it's simplier haha (aspect-ratio: 1/1, object-fit: cover;)

open cairn
#

Thanks Clement, you made my day

#

I think i'm gonna go for the css option,

long shell
#

yes easiest way if you only need a 1:1 ratio

open cairn
#

You are my hero