Title: Resize images before upload
Author: WPsites
Published: <strong>2012 年 3 月 13 日</strong>
Last modified: 2013 年 7 月 29 日

---

搜索插件

![](https://ps.w.org/resize-images-before-upload/assets/banner-772x250.jpg?rev=522185)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/resize-images-before-upload_ffffff.svg)

# Resize images before upload

 作者：[WPsites](https://profiles.wordpress.org/wpsites/)

[下载](https://downloads.wordpress.org/plugin/resize-images-before-upload.1.8.zip)

 * [详情](https://cn.wordpress.org/plugins/resize-images-before-upload/#description)
 * [评价](https://cn.wordpress.org/plugins/resize-images-before-upload/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/resize-images-before-upload/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/resize-images-before-upload/#developers)

 [支持](https://wordpress.org/support/plugin/resize-images-before-upload/)

## 描述

Resize your images before they are uploaded to your website (server), no need to
use image editing software. Drag+drop images from your digital camera to WordPress.
This plugin works best in HTML5 compatible web browsers such as Chrome or Firefox.

If your web browser does not support HTML5 then this plugin will swap your image
uploader runtime to the Adobe Flash version which makes sure the resize function
works across more web browsers. The side effect to this is drag+drop will be disabled
since this is not supported in Flash (everything works in HTML5 compatible browsers).
If you experience issues or drag+drop is more important to you than resizing images
then you can disable the Flash override in your settings -> media.

This plugin does not work on the iPhone or iPad.

This plugin removes the upload file size limit and turns on the resize function.

Once this plugin is enabled your images will be resized in the browser before being
uploaded to your website (server).

This plugin adds an additional setting to your settings -> media page that allows
you to specify the image quality when being resized. The quality value can range
from 1-100. The higher the quality the larger the file size. The default value is
80 which reduces the file size whilst still maintaining a decent quality image. 
You can also set the resize dimensions for this plugin here to, if you weren’t happy
inheriting the default large image size settings.

 * Less bandwidth used for your host when uploading your images
 * No more massive images uploaded to your site for users to sit waiting to view/
   download
 * You can drag images right off your digital camera onto the WordPress uploader,
   getting them online in a flash.

If you want to force the resized image width/height, overriding the media settings(
making it so multisite users cannot change this value etc) you can do this in wp-
config.php by setting two constants:

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

define( ‘RIBU_RESIZE_QUALITY’, 75 ); //0-100, 100 being high quality
 defined( ‘
RIBU_MAX_UPLOAD_SIZE’ ‘2097152b’ ) ); //size in bytes

To work, any settings added to your wp-config.php file should be done above the 
line that reads:
 /* That’s all, stop editing! Happy blogging. */

Find the plugin on github: https://github.com/WPsites/Resize-images-before-upload

### Contributors

Simon Dunton – http://www.wpsites.co.uk

## 安装

 1. Upload the resize-images-before-upload folder to the `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件

## 常见问题

  Installation Instructions

 1. Upload the resize-images-before-upload folder to the `/wp-content/plugins/` directory
 2. 通过WordPress的“插件”菜单激活插件

  How much will this plugin reduce my image file sizes by?

Before writing this I uploaded a photo straight from a digital camera sized at 2,969kb
once resized by this plugin that photo was reduced to 620k. The image was resized
to 1000 x 1000px with a quality of 100. Changing the quality to 80 resulted in a
smaller file size of 200k. You can alter these settings in your media setting.

  Does this plugin work on all browsers?

I don’t think so. This looks like part of the reason this function is left out of
WordPress core.

If the web browser supports HTML5 images will be resized. For browsers without HTML5
the Adobe Flash uploader will be used. If the browser doesn’t even have Flash then
a message will be shown (see change log) and no automatic resizing will take place.
http://www.plupload.com/ shows the uploader component features which has some further
notes on browser compatibility.

## 评价

![](https://secure.gravatar.com/avatar/ec1d15933d3335d7c848d2ac8cfcd9413d0a01c0e28ac4ddd1f3b04ec9a73552?
s=60&d=retro&r=g)

### 󠀁[Brilliant Plugin](https://wordpress.org/support/topic/brilliant-plugin-39/)󠁿

 [jscomino](https://profiles.wordpress.org/jscomino/) 2016 年 9 月 29 日

Upon searching the Wordpress repository, it’s clear that every plugin that resizes
images for you is a paid service, with one exception, THIS plugin! By resizing the
imaegs on our website, we’ve been able to drastically reduce traffic and server 
load. The benefits become even more apparent as we continue to grow. Thanks for 
this brilliant plugin!

![](https://secure.gravatar.com/avatar/26c2352d3fba94a35812f64105aadce5c6dbb14bd03b6c3a6da03eda714cfa44?
s=60&d=retro&r=g)

### 󠀁[Timesaver](https://wordpress.org/support/topic/timesaver-14/)󠁿

 [Alex R.](https://profiles.wordpress.org/dreamfish/) 2016 年 9 月 3 日

I had big problems with my host, uploading bigger images. This plugin really save
my time!

 [ 阅读所有23条评价 ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/)

## 贡献者及开发者

「Resize images before upload」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ WPsites ](https://profiles.wordpress.org/wpsites/)

[帮助将「Resize images before upload」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/resize-images-before-upload)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/resize-images-before-upload/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/resize-images-before-upload/)，或
通过[RSS](https://plugins.trac.wordpress.org/log/resize-images-before-upload/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/resize-images-before-upload/)。

## 更新日志

#### 1.8

 * Added height/width option to settings->media

#### 1.7.1

 * Updated to confirm works with 3.6

#### 1.7

 * Make frontend adding of JS code available as an option using RIBU_FRONTEND_JS
   = true|false rather than default. Thanks to https://github.com/createdwithlove.

#### 1.6

 * Tweaked the list of supported browsers adding Opera and then also adding ipad/
   iphone just to stop the warning coming up even if people aren’t uploading images
   on those platforms

#### 1.5

 * Removed lots of messy JS, using some new hooks. Should work from a post or from
   the media section with both new and old uploaders. Hopefully no more problems!

#### 1.4

 * Fix some script block issues that effected IE and possibly other browsers

#### 1.3

 * Fix typo with RIBU_RESIZE_HEIGHT define

#### 1.2

 * Fix issues with new media upload system

#### 1.1

 * Implemented new JS to check for Flash player that should work in IE
 * Added not regarding this plugin not working on iPhone or iPad

#### 1

 * Fixed issues with the new media upload system and enabling the flash runtime 
   for otherwise incompatible web browsers
 * New clearer alert message for incompatable browsers that don’t have Flash installed

#### 0.9

 * Added a new method for checking the max image upload size which checks the chosen
   function exists and falls back to ini check

#### 0.8

 * Implimented fix suggested by ‘linuxplayground’ for flash 404 error with query
   string https://wordpress.org/support/topic/suggested-small-fix?replies=2

#### 0.7

 * Added additional options that can be defined in wp-config.php for quality and
   max file size
 * Removed the option to disable the functionality provided by this plugin on the
   media upload page as it seemed impossible to integrate into the new media system
 * Fixed the problems with the new media upload system

#### 0.6

 * Added the ability to override the resize width and height in the wp-config.php
   file.
 * If the user hasn’t got a browser that supports HTML5 or Flash then the plugin
   now shows a warning message: “The Adobe Flash plug-in is required for automatic
   image resizing in your browser”. At which point the uploader will act as normal
   and not try to resize images automatically.

#### 0.5

 * If the users browser is not Chrome or Firefox then we force the upload runtime
   to Flash which means images will be resized regardless of browser. The downside
   to this is drag+drop will no longer work. If drag+drop is more important to you
   than image resizing then you can disable this new functionality in your settings-
   > media.

#### 0.4

 * Added resize quality setting. You can modify the setting in the admin settings-
   > media

#### 0.3

 * Made this plugin resize images automatically once enabled rather than having 
   to tick a box. The option (tick box) is still visible on the media uploader should
   you wish to temporarily disable this plugins functionality.
 * Max upload message is now hidden when this plugin is enabled as it’s not as much
   of an issue. The upload limit is still physically there, it’s set by your web
   host. Your resized images just stand a much greater chance of being below this
   limit.

#### 0.2

 * Readme changes.

#### 0.1

 * Initial release.

## 额外信息

 *  版本 **1.8**
 *  最后更新：**8 年前**
 *  活跃安装数量 **1,000+**
 *  WordPress 版本 ** 3.0 或更高版本 **
 *  已测试的最高版本为 **3.6.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/resize-images-before-upload/)
 * 标签
 * [images](https://cn.wordpress.org/plugins/tags/images/)[plupload](https://cn.wordpress.org/plugins/tags/plupload/)
   [resize](https://cn.wordpress.org/plugins/tags/resize/)
 *  [高级视图](https://cn.wordpress.org/plugins/resize-images-before-upload/advanced/)

## 评级

 4.6 星（最高 5 星）。

 *  [  19 条 5 星评价     ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/?filter=3)
 *  [  1 条 2 星评价     ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/resize-images-before-upload/reviews/)

## 贡献者

 *   [ WPsites ](https://profiles.wordpress.org/wpsites/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/resize-images-before-upload/)