Validate image uploading in admin panel
Created 6 years ago by araminho

I have "file" and "files" fields, and I want that only images with certain dimensions are uploaded. Is there any way to handle that?

ryanthompson  —  6 years ago

You can add a custom validator for the dimensions part. Checkout how the upload field type does it internally:

You would just override the field config on the builder to include your own validation like this for example:

Note you have to define a custom rule - and also a validator for that custom rule.