Support » How-To and Troubleshooting » Auto resize large image upload

Auto resize large image upload

  • I’m playing around with tweaks in the Media library for a network install, and am trying to limit all images to a maximum 1024×1024.

    This is the filter I am using, I can see it’s results in the inline js created on media admin screen, but when uploading a 1600×1200 image, the original image remains at 1600×1200?

    add_filter( 'plupload_init', 'tcb_resize_image_upload' );
    function tcb_resize_image_upload( $plupload_init ) {
      $plupload_init['resize'] = array( 'width'=>1024, 'height'=>1024, 'quality'=>90 );
      return $plupload_init;
  • The topic ‘Auto resize large image upload’ is closed to new replies.