Support » Plugin: WP User Profile Avatar » upload control

  • Resolved escenapintoresca


    Hi, thank you very much for the plugin, it works perfectly.

    Could I restrict the upload size of the files?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hitesh Makvana


    Hi @escenapintoresca

    You can add the following code to your child theme’s functions.php file and change the limit as per your needs.

    // Limit upload size for non-admins. Admins get the default limit.
    function increase_upload_size_limit( $limit ) {
      if ( ! current_user_can( 'manage_options' ) ) {
        $limit = 1048576; // 1 MB
      return $limit;
    add_filter( 'upload_size_limit', 'increase_upload_size_limit' );

    Thank you

    Thread Starter escenapintoresca


    Thank you very much for your quick reply!

    Best 🙂

    Plugin Contributor Ashok Dudhat



    No problem 🙂

    Please let us know if you have any further query in the future.

    It will really motivate us to make strong plugin continue, if you can leave a review for us.

    Thank you so much.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘upload control’ is closed to new replies.