mother / react-files

A file input (dropzone) management component for React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

check image dimensions

zetdotcom opened this issue · comments

Is there any way to check image dimensions/aspetc ratio using this library?

File instances are passed to the event handler, so you can use those to help you get the dimensions. Aspect ratio can be calculated from the dimensions. See: https://stackoverflow.com/questions/7460272/getting-image-dimensions-using-javascript-file-api