How to select image of specific size range with image viewer

hey koders
i want that users upload images of small size after picking with image viewer to cloudinary. Please help to how to show a error message when a users selects image of size lesser or greater than specific size range

Resolution or file size?

You have transformation on Cloudinary, so you can actually resize it once it is uploaded.

what about resizing the image before uploading?
you might want to use the image exension for that