Validating an image dimension

  • 17 October 2021
  • 2 replies
  • 9 views

HI

 

Can i validate in k2 rule an image that was uploaded to a form , type of jpeg , by asking about the image's dimension (i need to accept only image that itwis 80x80).

 

thank you very much


2 replies

Userlevel 2
Badge +10

Hi Sarita,


 


I'm not sure if there is an existing out-of-the box feature for this scenario. Perhaps, you can inject a javascript via data label to get the correct image width/height. After that, you can apply validation rule or show a message to notify the users.


https://www.tutorialrepublic.com/faq/how-to-get-original-image-size-in-javascript.php


 

thank you

Reply