The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Check image resolution on image file upload

Labels

This Discussion is public

Notifications

Hello,

I am wondering whether it is possible to check resolution of an image when it is uploaded using the AJAX uploader form element, and display an error when it fails to meet a minimum? Which hook(s) could I use?

I would suspect you would have to use the wp_get_attachment_image function and run some query to accomplish this.

Preferably I would like to display a notification right after the upload finishes, but before the form is submitted, so I think the image would not yet be an attachment at that point..

Formidable use Dropzone as file upload library. You can start with that. I'm currently looking for ways to detect if there are files uploaded.

Discussion closed.