Resolution check of image uploaded to form on submit

I am creating a custom form, in which the user is required to upload a few images. I am trying to write some code validating whether the image meets the required resolution, but cannot find a way to do so. I’m working in Wix Studio Editor.

I tried creating an image object in the browser and filling it with the url of the uploaded img but 'new Image()’ is not supported.

I tried fetching the image after uploading into the media library to then buffer it and check the dimensions that way but ‘.buffer()’ and ‘.arrayBuffer’ are not supported on wixFetchResponse objects.

I’m at a loss, this seems like functionality that would be commonly desired by developers.

Hi, @Jasper_Free !!

So, is this kind of what you tried ? :innocent:

I haven’t really worked on upload-related features recently, so I’m not entirely confident in my memory, but if things don’t work out with your current approach, I think it might be worth trying custom elements. With custom elements on Wix, you can usually achieve just about anything, so creating your own custom upload button could be a good solution. That way, you’d be able to run checks before the upload and reject files if necessary. :raising_hands: