WordPress.org

Ready to get started?Download WordPress

Forums

Auto resize large image upload (1 post)

  1. TCBarrett
    Member
    Posted 2 years ago #

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

    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 1600x1200 image, the original image remains at 1600x1200?

    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;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.