Answers.Body: <p>You should be able to implement a hook via PHP to validate the profile when it is submitted: <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_processProfile/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_processProfile/</a>.</p>
  
  <p>Someone else may want to chime in. I'm not sure if you can use form hooks with profiles. Otherwise you may check this: <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/</a></p>
  
  <p>You can then use PHP to validate the file size:
  Check this thread (<a href="https://stackoverflow.com/questions/9153224/how-to-limit-file-upload-type-file-size-in-php">https://stackoverflow.com/questions/9153224/how-to-limit-file-upload-type-file-size-in-php</a>). </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-17T20:47:21.153Z
Answers.LastActivityDate: 2017-10-17T20:47:21.153Z
Answers.UserDisplayName: Sleewok
Body: <p>We use the "image URL" field via profile to allow members to upload their organization logo. We would like to limit the file size a user can upload. Are there any options for us?
  Thank you!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T12:38:06.847Z
Comments.Text: Are you using Drupal, Joomla or WP?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-15T18:36:48.887Z
Comments.Text: We are using WP and CiviCRM 4.7.14.
Comments.UserDisplayName: Ferdinand Weps
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T20:37:00.340Z
Comments.Text: Are you uploading other files that will be larger than the image file size?
Comments.UserDisplayName: Sleewok
Tags: <images><contact-image>
Title: Limit file size for "image url" field
ThreadText: # Limit file size for "image url" field
  
  (Asked by: username_0 on 2017-10-13)
  
  We use the "image URL" field via profile to allow members to upload their organization logo. We would like to limit the file size a user can upload. Are there any options for us?
  Thank you!
  
  **Tags:** images, contact-image
  
  > **Comments:**
  > **username_1**: Are you using Drupal, Joomla or WP?  
  > **username_0**: We are using WP and CiviCRM 4.7.14.  
  > **username_2**: Are you uploading other files that will be larger than the image file size?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-17. Score: 1
  
  You should be able to implement a hook via PHP to validate the profile when it is submitted: <https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_processProfile/>.
  
  Someone else may want to chime in. I'm not sure if you can use form hooks with profiles. Otherwise you may check this: <https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/>
  
  You can then use PHP to validate the file size:
  Check this thread (<https://stackoverflow.com/questions/9153224/how-to-limit-file-upload-type-file-size-in-php>).
  
  
  ---
  
  