Support » Plugin: Resize images before upload » [Plugin: Resize images before upload] Force Settings in Multisite install

  • Resolved mrjarbenne

    (@mrjarbenne)


    Twofold feature request.

    Easy (perhaps): is there a way for me to change the default settings for the plugin by tweaking the code? I’d like the large size to be smaller.

    Harder: Is there a way for me to block users from changing the settings once I’ve tweaked them in a multisite instance where I’m trying to control the upload size of multiple blogs?

    Thanks for an excellent plugin. I’ll keep exploring this myself to see if I can figure it out.

    http://wordpress.org/extend/plugins/resize-images-before-upload/

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

    (@wpsites)

    You can just edit the main plugin file around line 42

    uploader.settings['resize'] = { width: resize_width, height: resize_height, quality: ${quality} };

    And where it says “resize_width” and “resize_height” hardcode the numbers. So something like this:

    uploader.settings['resize'] = { width: 800, height: 600, quality: ${quality} };

    There are a number of “resize_width” and “resize_height” variables around that area that you will also need to modify.

    If you hardcode it in the plugin the other multisite users shouldn’t be able to access the script source and make changes.

    I have a small update to the plugin that I could do with publishing. I might try and add a wp-config.php override of the image width and height so that you don’t have to edit the plugin. I will give you a shout on here if I manage that.

    Plugin Author WPsites

    (@wpsites)

    I have updated the plugin to version 0.6.

    You can now set the image width and height in your wp-config.php file like so:

    define( 'RIBU_RESIZE_WIDTH', 1000 ); //1000 px wide
    define( 'RIBU_RESIZE_HEIGHT', 900 ); //900 px high

    If those two definitions are in place in your wp-config.php file they override the usual media settings 🙂

    You rock. I’ll update and check it out shortly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Resize images before upload] Force Settings in Multisite install’ is closed to new replies.