Smush Image Compression and Optimization - Version 2.7.6

Version Description

  • Security: Fixed path traversal vulnerability. Thanks Ricardo Snchez(@neorichi) for responsible disclosure.
Download this release

Release Info

Developer jdailey
Plugin Icon 128x128 Smush Image Compression and Optimization
Version 2.7.6
Comparing to
See all releases

Code changes from version 2.7.5 to 2.7.6

assets/js/wp-smushit-admin.js CHANGED
@@ -2119,7 +2119,7 @@ jQuery(function ($) {
2119
  var abs_path = $('input[name="wp-smush-base-path"]').val();
2120
 
2121
  //Fill in the input field
2122
- $('.wp-smush-dir-path').val(abs_path + path);
2123
 
2124
  //Send a ajax request to get a list of all the image files
2125
  var param = {
2119
  var abs_path = $('input[name="wp-smush-base-path"]').val();
2120
 
2121
  //Fill in the input field
2122
+ $('.wp-smush-dir-path').val(abs_path + "/" + path);
2123
 
2124
  //Send a ajax request to get a list of all the image files
2125
  var param = {
changelog.txt ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Plugin Name: WP Smush
2
+
3
+ Change Log:
4
+ ----------------------------------------------------------------------
5
+ ----------------------------------------------------------------------
6
+
7
+ = 2.7.6 =
8
+
9
+ * Security: Fixed path traversal vulnerability. Thanks Ricardo Sánchez (@neorichi) for responsible disclosure.
10
+
11
+ = 2.7.5 =
12
+
13
+ * Update:
14
+ * UI/UX has been updated for Bulk Smush page
15
+
16
+ * Fixed:
17
+ * Start from latest image while Bulk Smushing
18
+ * S3 config error if AWS keys are defined in wp-config.php
19
+ * NextGen smush page not working properly
20
+ * Do not redirect to settings page on activation if WP CLI is installed
21
+ * Fixed a bunch of Notices/Errors
22
+
23
+
24
+ = 2.7.4.1 =
25
+
26
+ * Fixed:
27
+ * `get_current_screen()` method causing error on some sites
28
+
29
+ = 2.7.4 =
30
+
31
+ * Update: Minor UI changes
32
+ * Fixed: Images not being resized when image is uploaded via Mobile App
33
+ * Fixed: Notices and Warnings
34
+ * Fixed: S3 offload Integration - Original Image not being deleted in some cases
35
+
36
+ = 2.7.3.1 =
37
+
38
+ * Fixed: Pro user unable to login to WPMU DEV Dashboard plugin when Smush is active, Error: "Your key is invalid."
39
+ * Updated: S3 Integration, return URL for any error, 'as3cf_get_attached_file'
40
+
41
+ = 2.7.3 =
42
+
43
+ * Fixed:
44
+ * Manual Smush not working
45
+ * Bulk Smush not working for specific sites
46
+
47
+ = 2.7.2 =
48
+
49
+ * Updated:
50
+ * Use JS for stats calculation while using Bulk Smush, to reduce the Ajax time
51
+ * Fixed:
52
+ * Some Images would keep appearing in the re-smush list, if "Resize original images" is enabled
53
+ * Enable buttons in settings redirects to network smush settings page in a subsite if networkwide settings are enabled
54
+
55
+ = 2.7.1 =
56
+
57
+ * Fixed: Progress bar not being updated
58
+
59
+ = 2.7 =
60
+
61
+ * Updated:
62
+ * Faster image uploads: Set async request timeout to 0, if you're having trouble with Auto Smush, set timeout using filter `smush_async_time_out`
63
+
64
+ * Fixed:
65
+
66
+ * Issue with WP Smush Pro membership check
67
+ * Stats: Rating message shows incorrect image count
68
+ * Stats: Include directory smush stats in media stats
69
+ * Directory Smush: UI improvement
70
+ * Directory Smush: Allow re-smushing directory images, if the lossy feature is turned on
71
+ * Directory Smush: Fixed empty query warning if there are more than 5k images
72
+ * Site Ground Staging - Disable Async smush for staging sites, admin URL for async request is incorrect because of the Apache module
73
+ * Image appearing in Re-Smush list even after smushing, if resize settings are kept on.
74
+ * Performance: Updated query for smushed images count
75
+
76
+ * Added:
77
+ * WP S3 Offload - Plugin Compatibility for Remove files from server feature ( Pro Version )
78
+ * WP RSS Aggregator compatibility for Auto Smush
79
+ * WordPress mobile app Auto smush compatibility
80
+
81
+ = 2.6.3 =
82
+
83
+ * Fixed:
84
+
85
+ * Compatibility issue with WP Defender
86
+ * Image dimensions not updated after resizing in Grid view
87
+
88
+ * Added:
89
+
90
+ * Added a check to preserve smush stats on plugin deletion, You can add `define('WP_SMUSH_PRESERVE_STATS', true );` in wp-config.php
91
+
92
+ = 2.6.2 =
93
+
94
+ * Added:
95
+ * WP All Import Compatibility
96
+
97
+ * Fixed:
98
+ * Image not being updated to S3 after resmush ( *Only if remove files from server is kept off in S3 plugin settings )
99
+ * Added check for directory smush savings
100
+ * Call `wp_update_attachment_metadata` after smushing, to allow the optimised image to be used
101
+ * Dir Smush: Images with special symbols doesn't gets optimised
102
+ * Dir Smush: Skip .bak files
103
+ * Retina Images @2x: Do not smush if auto smush is disabled
104
+ * Backup ( Pro ): Take backup of original untouched image, improved backup and restore.
105
+
106
+ * Updated:
107
+ * Smush Limit ( 50 Images ), do not include images with error in count
108
+
109
+ = 2.6.1 =
110
+
111
+ * Fixed:
112
+ * PHP 5.2 compatibility
113
+ * DB error: Use a smaller value for Path Index size ( Prefix Indexes )
114
+ * Updated translation function name
115
+ * UI/UX fixes for directory smush
116
+ * Improved optimisation process for directory smush
117
+ * Updated uninstall.php
118
+ * Skip sites directory from Directory Smush in a Multisite
119
+
120
+ = 2.6 =
121
+
122
+ * Fixed:
123
+ * PHP 7 warning ( https://goo.gl/GKEMim ), @props: @alexis-mag
124
+ * Async Smush conflict with other plugins
125
+
126
+ * Changes:
127
+ * Moved notice JS/CSS in footer
128
+ * Bulk Smush page optimisation
129
+ * Increased timeout for Async request - Fixes Async smush not working for some hosting services
130
+
131
+ * Added:
132
+ * Directory Smush ( Pro Feature )
133
+
134
+ = 2.5.3 =
135
+
136
+ * Fixed:
137
+ * Show a Smush progress message in Grid view for Auto Smush
138
+ ( A lot of people reported it as Auto Smush not working, which works in background though )
139
+ * Translation domain was incorrect for few strings
140
+ * Translation: Load translation domain in main plugin file
141
+ * Include image size `medium_large` in smush list
142
+ * Error: Cannot use string offset as an array
143
+ * Error in PNG to JPG conversion ( Pro Feature ), added check for mime_content_type function
144
+ * Pro Status not recognised
145
+
146
+ = 2.5.2 =
147
+
148
+ * Added:
149
+ * Filter: `wp_smush_image`, Boolean, Whether to Smush image or not
150
+ * Async Optimisation for Auto Smush on upload ( Set WP_SMUSH_ASYNC to false to turn off async optimisation )
151
+ * Networkwide settings option in a Multisite
152
+
153
+ * Fixed:
154
+ * Double slash in file path causing 403 on some of the sites
155
+ * Localisation error reported by @talgat ( Thank You :) )
156
+
157
+ = 2.4.5 =
158
+
159
+ * Fixed:
160
+ * Error "No file content sent" with WP 4.6
161
+
162
+ = 2.4.4 =
163
+
164
+ * Fixed:
165
+ * Stats Calculation, Use custom query to retrieve data
166
+ * Fixed warning and notices
167
+ * PNG to JPEG conversion not working for Multisite ( Pro Users )
168
+ * thumbnails not being converted for PNG to JPEG conversion
169
+ * Removed option to convert Transparent PNGs to JPEGs ( Pro Users )
170
+ * Added check for invalid membership
171
+
172
+ = 2.4.3 =
173
+
174
+ * Fixed:
175
+ * Image resizing not working on image upload
176
+
177
+ = 2.4.2 =
178
+
179
+ * Fixed:
180
+ * PHP 5.2 compatibility
181
+
182
+ = 2.4.1 =
183
+
184
+ * Fixed:
185
+ Conflict with customizer
186
+
187
+ = 2.4 =
188
+
189
+ * Compatibility:
190
+ * WPML Media Add-on compatibility, you can smush all the images for all the languages at once from Bulk Smush page
191
+
192
+ * Features:
193
+ * Added PNG to JPG - Lossy Conversion for higher savings ( Pro Feature )
194
+
195
+ *Fixed:
196
+ * EXIF: Device details were left out for some images, even when opted for stripping it
197
+
198
+ * Updated:
199
+ * Minor Tweaks on WP Smush Page ( Bulk Smush )
200
+ * Stats calculation is more accurate
201
+ * Show current image size and image size dimensions in media library after image has been smushed
202
+ * JPEG optimisation - higher savings for JPEGs lossy optimisation ( Pro Feature )
203
+
204
+ = 2.3.1 =
205
+
206
+ * Fixed:
207
+ * Stats not updated on resizing images
208
+ * CSS conflict in Media Library
209
+
210
+ = 2.3 =
211
+
212
+ * Fixed:
213
+ * Tooltip on image edit page
214
+ * Warning and Notices
215
+ * Updated:
216
+ * Improved stats calculation
217
+ * Bulk Smush page optimised for Image heavy sites
218
+ * Cleanup on uninstall
219
+ * Added:
220
+ * Image Resizing option for Media, NextGen(Pro Only) images
221
+ * Total image count on stats page
222
+
223
+ = 2.2.2 =
224
+ - Fixed: JS error causing issue with Editor on some installs, plugin conflict with CoursePress plugin, ACF ( Clear All Caches after plugin upgrade, Cloudflare as well )
225
+ - Fixed: ReSmush count for bulk smushing
226
+ - Fixed: Smush settings accessibility for Screen reader/Keyboard
227
+ - Fixed: WP Admin loading slow ( Load smush stats on required admin pages only )
228
+
229
+ = 2.2.1 =
230
+ * New: Option to resmush image if settings are changed after optimising images
231
+ * New: Added an option to preserve EXIF
232
+ * New: Remove Smush meta on image regeneration,
233
+ This allows user to manually smush them later, if auto smush is off ( WP Image Editor support )
234
+ * New: Manual Image restore option for Media Library and NextGen Gallery, if "Backup Original Images" was kept on while smushing ( Pro Only )
235
+ * New: Delete Backup Files (Pro Only) on attachment deletion
236
+ * Updated: Upfront Integration
237
+ * Fixed: jQuery tooltip conflict
238
+ * Code Optimisation, Updated Settings page UI
239
+
240
+ = 2.1.5 =
241
+ * Fixed: WP Media Folder Plugin compatibility
242
+ * Fixed: Warning on Plugins Page
243
+ * Updated: Settings Page styling
244
+
245
+ = 2.1.4 =
246
+ * Fixed: Preserve file permission after smushing ( Fix for Images disappearing in Media library on some hosts )
247
+ * Fixed: Styles plugin compatibility
248
+ * Fixed: Append URL params considering the existing arguments ( WPML Compatibility )
249
+ * Fixed: Warning: For settings link in Network admin, Warning: https://goo.gl/HAfhaF ( Thank you @Maks3w for suggestions )
250
+ * Fixed: Fatal error if both pro version and free version are activated
251
+ * Fixed: NextGen-Smush conflict on plugin activation on a fresh install
252
+
253
+ = 2.1.3 =
254
+ * Fixed: Compatibility with v4.0 of our Dashboard plugin, was not detecting pro status
255
+
256
+ = 2.1.2 =
257
+ * Fixed: Important fix for transient issue leading to mutliple api requests
258
+
259
+ = 2.1.1 =
260
+ * Fixed: Workaround for terrible bug in W3TC file based object caching
261
+
262
+ = 2.1 =
263
+
264
+ * Fixed: Untranslatable strings in settings
265
+ * Fixed: Increased is_pro() API timeouts
266
+ * Fixed: Remove redundant _get_api_key() cache check
267
+ * Fixed: Some PHP notices on fresh installs
268
+ * Fixed: Bulk Smush button keeps spinning after 50 images for free version
269
+ * Fixed: NextGen Bulk Smush button issue
270
+ * Fixed: Invalid header issue
271
+ * Fixed: Warnings in file functions
272
+ * Updated: Added limit on query results, for sites with higher image count, Use filter `wp_smush_media_query_limit` to adjust values
273
+ * Added: Sortable WP Smush column in Media Library
274
+ * Added: Filters `wp_smush_media_image` for Media Gallery, `wp_smush_nextgen_image` For NextGen gallery,
275
+ allows to skip a particular image size from smushing
276
+ * Added: NextGen Gallery support
277
+
278
+ = 2.0.6.5 =
279
+
280
+ * Updated: Skip webp images ( causing ajax error for few sites )
281
+ * Fixed: Warning and Notices ( Media Library not loading )
282
+ * Fixed: Smush full size image if no other sizes are available
283
+ * Added: Detailed text for stats and settings
284
+
285
+ = 2.0.6.3 =
286
+
287
+ * Fixed: Change File permission after replacing image
288
+ * Fixed: Directory path for files
289
+ * Fixed: Workaround for Auto Smush issue on Hostgator
290
+ * Fixed: Smush button doesn't works in media library dialog on post screen, when add media is clicked
291
+ (https://wordpress.org/support/topic/like-wp-smush-a-lot)
292
+ * New: Show number of images smushed in stats column
293
+ * Added: Support for WP Retina 2x Plugin
294
+ * Added: Filter `WP_SMUSH_API_TIMEOUT` to change the default time out value from 60s
295
+ * Added: Smush original image option (Pro Only)
296
+
297
+ = 2.0.6.2 =
298
+
299
+ * Use string for text domain instead of PHP Constant ( WordPress Guideline )
300
+
301
+ 2.0.6.1 - 2015-05-20 - Umesh Kumar
302
+
303
+ - Updated: Max image size set to 32Mb for Pro Version
304
+
305
+ 2.0.6 - 2015-05-20 - Umesh Kumar
306
+
307
+ - Fixed: Conflict with various themes while editing post and page
308
+ - Fixed: Word Count not working
309
+ - Fixed: Notice and Warnings
310
+
311
+ 2.0.5 - 2015-04-17 - Aaron Edwards, Sam Najian, Umesh Kumar
312
+
313
+ - New: Allow Super-smush for existing smushed images
314
+ - Fixed: IMPORTANT - broken transient caching for is_pro
315
+ - Fixed: Fixed conflict with wp gallery link plugin in grid view
316
+ - Fixed: Other small fixes
317
+
318
+ 2.0.4 - 2015-04-14 - Aaron Edwards, Umesh Kumar
319
+
320
+ - Fix: Fatal error conflict with some plugins on fronted of site
321
+
322
+ 2.0.3 - 2015-04-14 - Aaron Edwards, Sam Najian and Umesh Kumar
323
+ ----------------------------------------------------------------------
324
+
325
+ - Complete rewrite to use WPMU DEV's new fast and reliable API service.
326
+ - New: "Super-Smush" your images with our intelligent multi-pass lossy compression. Get >60% average compression with almost no noticeable quality loss!
327
+ - New: Keep a backup of your original un-smushed images in case you want to restore later.
328
+ - UX/UI updated with overall stats, progress bar.
329
+
330
+ 1.1.1 - 2015-03-27 - Umesh Kumar
331
+ ----------------------------------------------------------------------
332
+ - Updated: Use simplified meta queries
333
+
334
+ 1.1 - 2015-03-27 - Umesh Kumar
335
+ ----------------------------------------------------------------------
336
+ - New: New API Servers added for faster optimization
337
+ - Fixed: PHP warning for broken files
338
+
339
+ 1.0.3.1 - 2015-03-26 - Umesh Kumar
340
+ ----------------------------------------------------------------------
341
+ - New: Suggest manual smushing for smaller bulk request
342
+ - New: Allow media sorting in list view as per smush status
343
+ - Updated: Bulk smush query
344
+ - Updated: Wait time estimation
345
+
346
+ 1.0.3 - 2015-02-27 - Umesh Kumar
347
+ ----------------------------------------------------------------------
348
+ - New: Added constant 'WPMUDEV_APIKEY', to specify WPMU membership key explicitly
349
+ - Fixed: Plugin activation issue in Multisite
350
+ - Fixed: Decode URLs received from API to remove any encoded characters
351
+
352
+ 1.0.2 - 2015-02-03 - Umesh Kumar
353
+ ----------------------------------------------------------------------
354
+ - Fixed: Use options instead of transient to fix W3TC object caching issue
355
+ - New: Modify email address for bulk smush notification
356
+
357
+ 1.0.1 - 2015-01-01 - Umesh Kumar
358
+ ----------------------------------------------------------------------
359
+ - New: CDN, suggestion to whitelist IP
360
+ - New: Use Ajax to check API status
361
+ - New: Limit concurrent pending single smush to 1000, to avoid hogging up of server resources
362
+ - Fixed: Db cleanup on uninstall
363
+ - Fixed: Remove unnecessary meta on install
364
+ - Fixed: Request status for removed bulk requests
365
+ - Updated: Allowed file types (JPEF, PNG, GIF )
366
+ - Updated: Wait Time reduced
367
+
368
+
369
+ 1.0 - 2014-11-24 - Saurabh Shukla, Umesh Kumar
370
+ ----------------------------------------------------------------------
371
+ - First release
languages/wp-smushit.pot CHANGED
@@ -2,8 +2,8 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WP Smush\n"
5
- "POT-Creation-Date: 2017-09-28 12:43+0530\n"
6
- "PO-Revision-Date: 2017-09-28 12:43+0530\n"
7
  "Last-Translator: Umesh <umeshsingla05@gmail.com>\n"
8
  "Language-Team: Umesh <umeshsingla05@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -573,41 +573,41 @@ msgstr ""
573
  msgid "ADD DIRECTORY"
574
  msgstr ""
575
 
576
- #: lib/class-wp-smush-dir.php:463
577
  msgid "Exclude directory from Smush List"
578
  msgstr ""
579
 
580
- #: lib/class-wp-smush-dir.php:599
581
  msgid "We could not find any images in the selected directory."
582
  msgstr ""
583
 
584
- #: lib/class-wp-smush-dir.php:920
585
  #, php-format
586
  msgid "%d images"
587
  msgstr ""
588
 
589
- #: lib/class-wp-smush-dir.php:953
590
  msgid "Waiting.."
591
  msgstr ""
592
 
593
- #: lib/class-wp-smush-dir.php:1075
594
  msgid "Incorrect image id"
595
  msgstr ""
596
 
597
- #: lib/class-wp-smush-dir.php:1109
598
  msgid "Could not find image id in last scanned images"
599
  msgstr ""
600
 
601
- #: lib/class-wp-smush-dir.php:1122
602
  msgid "Image couldn't be optimized"
603
  msgstr ""
604
 
605
- #: lib/class-wp-smush-dir.php:1166 lib/class-wp-smush-dir.php:1299
606
  #, php-format
607
  msgid "You've smushed %d images in total."
608
  msgstr ""
609
 
610
- #: lib/class-wp-smush-dir.php:1243
611
  msgid ""
612
  "We were unable to retrieve the image list from last scan, please continue "
613
  "with a latest scan"
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WP Smush\n"
5
+ "POT-Creation-Date: 2017-10-04 09:34+0530\n"
6
+ "PO-Revision-Date: 2017-10-04 09:34+0530\n"
7
  "Last-Translator: Umesh <umeshsingla05@gmail.com>\n"
8
  "Language-Team: Umesh <umeshsingla05@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
573
  msgid "ADD DIRECTORY"
574
  msgstr ""
575
 
576
+ #: lib/class-wp-smush-dir.php:471
577
  msgid "Exclude directory from Smush List"
578
  msgstr ""
579
 
580
+ #: lib/class-wp-smush-dir.php:610
581
  msgid "We could not find any images in the selected directory."
582
  msgstr ""
583
 
584
+ #: lib/class-wp-smush-dir.php:931
585
  #, php-format
586
  msgid "%d images"
587
  msgstr ""
588
 
589
+ #: lib/class-wp-smush-dir.php:964
590
  msgid "Waiting.."
591
  msgstr ""
592
 
593
+ #: lib/class-wp-smush-dir.php:1086
594
  msgid "Incorrect image id"
595
  msgstr ""
596
 
597
+ #: lib/class-wp-smush-dir.php:1120
598
  msgid "Could not find image id in last scanned images"
599
  msgstr ""
600
 
601
+ #: lib/class-wp-smush-dir.php:1133
602
  msgid "Image couldn't be optimized"
603
  msgstr ""
604
 
605
+ #: lib/class-wp-smush-dir.php:1177 lib/class-wp-smush-dir.php:1310
606
  #, php-format
607
  msgid "You've smushed %d images in total."
608
  msgstr ""
609
 
610
+ #: lib/class-wp-smush-dir.php:1254
611
  msgid ""
612
  "We were unable to retrieve the image list from last scan, please continue "
613
  "with a latest scan"
lib/class-wp-smush-dir.php CHANGED
@@ -91,14 +91,14 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
91
  <?php
92
  if ( $human < 0 ) { ?>
93
  <span class="wp-smush-stats-human"> <?php echo size_format( $human,1 ); ?></span><?php
94
- //Output percentage only if > 1
95
  if ( $percent > 1 ) { ?>
96
  <span class="wp-smush-stats-sep">/</span>
97
  <span class="wp-smush-stats-percent"><?php echo ! empty( $percent ) ? $percent : ''; ?>%</span><?php
98
  }
99
  } else { ?>
100
  <span class="wp-smush-stats-human settings-desc"><?php esc_html_e("Smush images that aren't located in your uploads folder.", "wp-smushit"); ?>
101
- <a href="#wp-smush-dir-browser" class="wp-smush-dir-link"><?php esc_html_e( "Choose directory", "wp-smushit" ); ?></a>
102
  </span>
103
  <span class="wp-smush-stats-sep hidden">/</span>
104
  <span class="wp-smush-stats-percent"></span>
@@ -347,9 +347,16 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
347
  check_ajax_referer( 'smush_get_dir_list', 'list_nonce' );
348
 
349
  //Get the Root path for a main site or subsite
350
- $root = $this->get_root_path();
351
 
352
- $postDir = rawurldecode( $root . ( isset( $_GET['dir'] ) ? $_GET['dir'] : null ) );
 
 
 
 
 
 
 
353
 
354
  $supported_image = array(
355
  'gif',
@@ -371,15 +378,16 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
371
  $list = "<ul class='jqueryFileTree'>";
372
  foreach ( $files as $file ) {
373
 
374
- $htmlRel = htmlentities( $returnDir . $file );
375
  $htmlName = htmlentities( $file );
376
  $ext = preg_replace( '/^.*\./', '', $file );
377
 
378
- if ( file_exists( $postDir . $file ) && $file != '.' && $file != '..' ) {
379
- if ( is_dir( $postDir . $file ) && ! $this->skip_dir( $postDir . $file ) ) {
 
380
  //Skip Uploads folder - Media Files
381
  $list .= "<li class='directory collapsed'><a rel='" . $htmlRel . "/'>" . $htmlName . "</a></li><br />";
382
- } else if ( in_array( $ext, $supported_image ) && ! $this->is_media_library_file( $postDir . $file ) ) {
383
  $list .= "<li class='file ext_{$ext}'><a rel='" . $htmlRel . "'>" . $htmlName . "</a></li><br />";
384
  }
385
  }
@@ -475,9 +483,12 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
475
  function get_image_list( $path = '' ) {
476
  global $wpdb;
477
 
478
- $base_dir = empty( $path ) ? $_GET['path'] : $path;
479
- //Directory Path
480
- $base_dir = realpath( $base_dir );
 
 
 
481
 
482
  //Store the path in option
483
  update_option( 'wp-smush-dir_path', $base_dir, false );
@@ -875,7 +886,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
875
  */
876
  function generate_markup( $images ) {
877
 
878
- global $wpsmush_helper;
879
 
880
  if ( empty( $images ) || empty( $images['files_arr'] ) || empty( $images['image_items'] ) ) {
881
  return null;
@@ -985,8 +996,8 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
985
  $offset += $limit;
986
  //If offset is above total number, do not query
987
  if( $offset > $total ) {
988
- $continue = false;
989
- }
990
  }
991
 
992
  //Iterate over stats, Return Count and savings
91
  <?php
92
  if ( $human < 0 ) { ?>
93
  <span class="wp-smush-stats-human"> <?php echo size_format( $human,1 ); ?></span><?php
94
+ //Output percentage only if > 1
95
  if ( $percent > 1 ) { ?>
96
  <span class="wp-smush-stats-sep">/</span>
97
  <span class="wp-smush-stats-percent"><?php echo ! empty( $percent ) ? $percent : ''; ?>%</span><?php
98
  }
99
  } else { ?>
100
  <span class="wp-smush-stats-human settings-desc"><?php esc_html_e("Smush images that aren't located in your uploads folder.", "wp-smushit"); ?>
101
+ <a href="#wp-smush-dir-browser" class="wp-smush-dir-link"><?php esc_html_e( "Choose directory", "wp-smushit" ); ?></a>
102
  </span>
103
  <span class="wp-smush-stats-sep hidden">/</span>
104
  <span class="wp-smush-stats-percent"></span>
347
  check_ajax_referer( 'smush_get_dir_list', 'list_nonce' );
348
 
349
  //Get the Root path for a main site or subsite
350
+ $root = realpath( $this->get_root_path() );
351
 
352
+ $dir = isset( $_GET['dir'] ) ? ltrim( $_GET['dir'], '/' ) : null;
353
+ $postDir = strlen( $dir ) > 1 ? path_join( $root, $dir ) : $root . $dir;
354
+ $postDir = realpath( rawurldecode( $postDir ) );
355
+
356
+ //If the final path doesn't contains the root path, bail out.
357
+ if ( !$root || $postDir === false || strpos( $postDir, $root ) !== 0 ) {
358
+ wp_send_json_error( "Unauthorized" );
359
+ }
360
 
361
  $supported_image = array(
362
  'gif',
378
  $list = "<ul class='jqueryFileTree'>";
379
  foreach ( $files as $file ) {
380
 
381
+ $htmlRel = htmlentities( ltrim( path_join( $returnDir , $file ), '/' ) );
382
  $htmlName = htmlentities( $file );
383
  $ext = preg_replace( '/^.*\./', '', $file );
384
 
385
+ $file_path = path_join( $postDir, $file );
386
+ if ( file_exists( $file_path ) && $file != '.' && $file != '..' ) {
387
+ if ( is_dir( $file_path ) && ! $this->skip_dir( $file_path ) ) {
388
  //Skip Uploads folder - Media Files
389
  $list .= "<li class='directory collapsed'><a rel='" . $htmlRel . "/'>" . $htmlName . "</a></li><br />";
390
+ } else if ( in_array( $ext, $supported_image ) && ! $this->is_media_library_file( $file_path ) ) {
391
  $list .= "<li class='file ext_{$ext}'><a rel='" . $htmlRel . "'>" . $htmlName . "</a></li><br />";
392
  }
393
  }
483
  function get_image_list( $path = '' ) {
484
  global $wpdb;
485
 
486
+ $base_dir = empty( $path ) ? ltrim( $_GET['path'], '/' ) : $path;
487
+ $base_dir = realpath( rawurldecode( $base_dir ) );
488
+
489
+ if ( !$base_dir ) {
490
+ wp_send_json_error( "Unauthorized" );
491
+ }
492
 
493
  //Store the path in option
494
  update_option( 'wp-smush-dir_path', $base_dir, false );
886
  */
887
  function generate_markup( $images ) {
888
 
889
+ global $wpsmush_helper;
890
 
891
  if ( empty( $images ) || empty( $images['files_arr'] ) || empty( $images['image_items'] ) ) {
892
  return null;
996
  $offset += $limit;
997
  //If offset is above total number, do not query
998
  if( $offset > $total ) {
999
+ $continue = false;
1000
+ }
1001
  }
1002
 
1003
  //Iterate over stats, Return Count and savings
readme.txt CHANGED
@@ -1,23 +1,25 @@
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
- Version: 2.7.5
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
- Tags: image, resize, optimize, compress, performance, lossless, lossy, photo, pictures, optimize JPG, compress PNG, Smush WordPress Compression, Smush.it
8
- Requires at least: 3.5
9
- Tested up to: 4.8.2
10
- Stable tag: 2.7.5
11
  Requires PHP: 5.2.4
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
14
- Compress and optimize image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
15
 
16
  == Description ==
17
 
18
- <strong>Resize, optimize and compress all of your images with the incredibly powerful and 100% free WordPress image smusher, brought to you by the superteam at WPMU DEV!</strong>
19
 
20
- = Award Winning Image Optimization =
 
 
21
  Smush has been benchmarked and tested number one for speed and quality and is the <a href="https://torquemag.io/2017/04/wp-smush-defeats-wordfence-wins-plugin-madness-2017/">award-winning</a>, proven crowd favorite image optimization plugin for WordPress.
22
 
23
  Now with image resizing! Set a max width and height and large images will scale down as they are being compressed.
@@ -54,7 +56,10 @@ No matter what plugins you use to better manage your WordPress media library, Sm
54
  “I had no idea that my page load time was being dragged down by the images. The plugin nearly halved the time it took.” - <a href="http://profiles.wordpress.org/karlcw">karlcw</a>
55
 
56
  ★★★★★ <br>
57
- “I optimize my photos in Photoshop, but Smush makes it so easy – it does it automatically. I can just sit back and enjoy the speed.” - <a href="https://profiles.wordpress.org/helen432">helen432</a>
 
 
 
58
 
59
  <strong>What about Multisite?</strong> WP Smush can be used to optimize all the images across your entire network! Use global settings or configure each site individually.
60
 
@@ -129,12 +134,14 @@ Optimizing all the image sizes generated by WordPress, images being imported fro
129
 
130
  Smush automatically handles optimizing all your images no matter where they come from and can be used as a standalone tool or alongside Photoshop.
131
 
 
 
 
132
  == Screenshots ==
133
 
134
- 1. Optimize images with Smush to save space and speed up your sites.
135
- 2. Watch as your image library is processed up to 50 images at a time.
136
- 3. Set automatic smush to resize and optomize every image as it is uploaded.
137
- 4. Smush will find and optimize images for you.
138
 
139
  == Installation ==
140
 
@@ -150,6 +157,10 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
150
 
151
  == Changelog ==
152
 
 
 
 
 
153
  = 2.7.5 =
154
 
155
  * Updated:
@@ -181,7 +192,7 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
181
 
182
  = 2.7.3 =
183
 
184
- *Fixed:
185
  * Manual Smush not working
186
  * Bulk Smush broken for few sites
187
 
@@ -218,403 +229,8 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
218
  * WP RSS Aggregator compatibility for Auto Smush
219
  * WordPress mobile app Auto smush compatibility
220
 
221
- = 2.6.3 =
222
-
223
- * Fixed:
224
-
225
- * Compatibility issue with WP Defender
226
- * Image dimensions not updated after resizing in Grid view
227
-
228
- * Added:
229
-
230
- * Added a check to preserve smush stats on plugin deletion, You can add `define('WP_SMUSH_PRESERVE_STATS', true );` in wp-config.php
231
-
232
- = 2.6.2 =
233
-
234
- * Added:
235
- * WP All Import Compatibility
236
-
237
- * Fixed:
238
- * Image not being updated to S3 after resmush ( *Only if remove files from server is kept off in S3 plugin settings )
239
- * Added check for directory smush savings
240
- * Call `wp_update_attachment_metadata` after smushing, to allow the optimised image to be used
241
- * Dir Smush: Images with special symbols doesn't gets optimised
242
- * Dir Smush: Skip .bak files
243
- * Retina Images @2x: Do not smush if auto smush is disabled
244
- * Backup ( Pro ): Take backup of original untouched image, improved backup and restore.
245
-
246
- * Updated:
247
- * Smush Limit ( 50 Images ), do not include images with error in count
248
-
249
- = 2.6.1 =
250
-
251
- * Fixed:
252
- * PHP 5.2 compatibility
253
- * DB error: Use a smaller value for Path Index size ( Prefix Indexes )
254
- * Updated translation function name
255
- * UI/UX fixes for directory smush
256
- * Improved optimisation process for directory smush
257
- * Updated uninstall.php
258
- * Skip sites directory from Directory Smush in a Multisite
259
-
260
- = 2.6 =
261
-
262
- * Fixed:
263
- * PHP 7 warning ( https://goo.gl/GKEMim ), @props: @alexis-mag
264
- * Async Smush conflict with other plugins
265
-
266
- * Changes:
267
- * Moved notice JS/CSS in footer
268
- * Bulk Smush page optimisation
269
- * Increased timeout for Async request - Fixes Async smush not working for some hosting services
270
-
271
- * Added:
272
- * Directory Smush
273
-
274
- = 2.5.3 =
275
-
276
- * Fixed:
277
- * Show a Smush progress message in Grid view for Auto Smush
278
- ( A lot of people reported it as Auto Smush not working, which works in background though )
279
- * Translation domain was incorrect for few strings
280
- * Translation: Load translation domain in main plugin file
281
- * Include image size `medium_large` in smush list
282
- * Error: Cannot use string offset as an array
283
- * Error in PNG to JPG conversion ( Pro Feature ), added check for mime_content_type function
284
- * Pro Status not recognised
285
-
286
- = 2.5.2 =
287
-
288
- * Added:
289
- * Filter: `wp_smush_image`, Boolean, Whether to Smush image or not
290
- * Async Optimisation for Auto Smush on upload ( Set WP_SMUSH_ASYNC to false to turn off async optimisation )
291
- * Networkwide settings option in a Multisite
292
-
293
- * Fixed:
294
- * Double slash in file path causing 403 on some of the sites
295
- * Localisation error reported by @talgat ( Thank You :) )
296
-
297
- = 2.4.5 =
298
-
299
- * Fixed:
300
- * Error "No file content sent" with WP 4.6
301
-
302
- = 2.4.4 =
303
-
304
- * Fixed:
305
- * PNG to JPEG conversion not working for Multisite
306
- * Stats Calculation, Use custom query to retrieve data
307
- * Fixed warning and notices
308
- * Added check for invalid membership ( Pro Users )
309
- * thumbnails not being converted for PNG to JPEG conversion
310
- * Removed option to convert Transparent PNGs to JPEGs ( Pro Users )
311
-
312
- = 2.4.3 =
313
-
314
- * Fixed: Image resizing not working on image upload
315
-
316
- = 2.4.2 =
317
-
318
- * Fixed: PHP 5.2 compatibility
319
-
320
- = 2.4.1 =
321
-
322
- * Fixed: Conflict with Customizer
323
-
324
- = 2.4 =
325
-
326
- * Compatibility:
327
- * WPML Media Add-on compatibility, you can smush all the images for all the languages at once from Bulk Smush page
328
-
329
- * Features:
330
- * Added PNG to JPG - Lossy Conversion for higher savings ( Pro Feature )
331
-
332
- *Fixed:
333
- * EXIF: Device details were left out for some images, even when opted for stripping it
334
-
335
- * Updated:
336
- * Minor Tweaks on WP Smush Page ( Bulk Smush )
337
- * Stats calculation is more accurate
338
- * Show current image size and image size dimensions in media library after image has been smushed
339
- * JPEG optimisation - higher savings for JPEGs lossy optimisation ( Pro Feature )
340
-
341
- = 2.3.1 =
342
-
343
- * Fixed:
344
- * Stats not updated on resizing images
345
- * CSS conflict in Media Library
346
-
347
- = 2.3 =
348
-
349
- * Fixed:
350
- * Tooltip on image edit page
351
- * Warning and Notices
352
- * Updated:
353
- * Improved stats calculation
354
- * Bulk Smush page optimised for Image heavy sites
355
- * Cleanup on uninstall
356
- * Added:
357
- * Image Resizing option for Media, NextGen(Pro Only) images
358
- * Total image count on stats page
359
-
360
- = 2.2.2 =
361
-
362
- - Fixed: JS error causing issue with Editor on some installs, plugin conflict with CoursePress plugin, ACF ( Clear All Caches after plugin upgrade, Cloudflare as well )
363
- - Fixed: ReSmush count for bulk smushing
364
- - Fixed: Smush settings accessibility for Screen reader/Keyboard
365
- - Fixed: WP Admin loading slow ( Load smush stats on required admin pages only )
366
-
367
- = 2.2.1 =
368
- * New: Option to resmush image if settings are changed after optimising images
369
- * New: Added an option to preserve EXIF
370
- * New: Remove Smush meta on image regeneration,
371
- This allows user to manually smush them later, if auto smush is off ( WP Image Editor support )
372
- * New: Manual Image restore option for Media Library and NextGen Gallery, if "Backup Original Images" was kept on while smushing ( Pro Only )
373
- * New: Delete Backup Files (Pro Only) on attachment deletion
374
- * Updated: Upfront Integration
375
- * Fixed: jQuery tooltip conflict
376
- * Code Optimisation, Updated Settings page UI
377
-
378
- = 2.1.5 =
379
-
380
- * Fixed: WP Media Folder Plugin compatibility
381
- * Fixed: Warning on Plugins Page
382
- * Updated: Settings Page styling
383
-
384
- = 2.1.4 =
385
- * Fixed: Preserve file permission after smushing ( Fix for Images disappearing in Media library on some hosts )
386
- * Fixed: Styles plugin compatibility
387
- * Fixed: Append URL params considering the existing arguments ( WPML Compatibility )
388
- * Fixed: Warning: For settings link in Network admin, Warning: https://goo.gl/HAfhaF ( Thank you @Maks3w for suggestions )
389
- * Fixed: Fatal error if both pro version and free version are activated
390
- * Fixed: NextGen-Smush conflict on plugin activation on a fresh install
391
-
392
- = 2.1.3 =
393
- * Fixed: Compatibility with WPMU DEV Dashboard plugin v4.0, was not detecting pro status
394
-
395
- = 2.1.2 =
396
- * Fixed: Important fix for transient issue leading to multiple api requests
397
-
398
- = 2.1.1 =
399
- * Fixed: Workaround for terrible bug in W3TC file based object caching
400
-
401
- = 2.1 =
402
- * Fixed: Untranslatable strings in settings
403
- * Fixed: Increased is_pro() API timeouts
404
- * Fixed: Remove redundant _get_api_key() cache check
405
- * Fixed: Some PHP notices on fresh installs
406
-
407
- = 2.0.7.1 =
408
-
409
- * Fixed: Bulk Smush button keeps spinning after 50 images for free version
410
- * Fixed: NextGen Bulk Smush button issue
411
-
412
- = 2.0.7 =
413
-
414
- * Fixed: Invalid header issue
415
- * Fixed: Warnings in file functions
416
- * Updated: Added limit on query results, for sites with higher image count, Use filter `wp_smush_media_query_limit` to adjust values
417
- * Added: Sortable WP Smush column in Media Library
418
- * Added: Filters `wp_smush_media_image` for Media Gallery, `wp_smush_nextgen_image` For NextGen gallery,
419
- allows to skip a particular image size from smushing
420
- * Added: NextGen Gallery support (Pro feature)
421
-
422
- = 2.0.6.5 =
423
-
424
- * Updated: Skip webp images ( causing ajax error for few sites )
425
- * Fixed: Warning and Notices ( Media Library not loading )
426
- * Fixed: Smush full size image if no other sizes are available
427
- * Added: Detailed text for stats and settings
428
-
429
- = 2.0.6.3 =
430
-
431
- * Fixed: Change File permission after replacing image
432
- * Fixed: Directory path for files
433
- * Fixed: Workaround for Auto Smush issue on Hostgator
434
- * Fixed: Smush button doesn't works in media library dialog on post screen, when add media is clicked
435
- (https://wordpress.org/support/topic/like-wp-smush-a-lot)
436
- * New: Show number of images smushed in stats column
437
- * Added: Support for WP Retina 2x Plugin
438
- * Added: Filter `WP_SMUSH_API_TIMEOUT` to change the default time out value from 60s
439
- * Added: Smush original image option (Pro Only)
440
-
441
- = 2.0.6.2 =
442
-
443
- * Use string for text domain instead of PHP Constant ( WordPress Guideline )
444
-
445
- = 2.0.6.1 =
446
-
447
- * Updated: Max image size limit to 32Mb for Pro Version
448
-
449
- = 2.0.6 =
450
-
451
- * Fixed: Conflict with various themes while editing post and page
452
- * Fixed: Word Count not working
453
- * Fixed: Notice and Warnings
454
-
455
- = 2.0.5 =
456
-
457
- * New: Allow Super-smush for existing smushed images (Pro Only)
458
- * Fixed: IMPORTANT - broken transient caching for is_pro
459
- * Fixed: Fixed conflict with wp gallery link plugin in grid view
460
- * Fixed: Other small fixes
461
-
462
-
463
- = 2.0.4 =
464
- * Fix: Fatal error conflict with some plugins on fronted of site
465
-
466
- = 2.0.3 =
467
- * Fixed (Important Update) - Image being corrupted while regenerating thumbnails
468
-
469
- = 2.0.2 =
470
- * Check for existing constant definition, before defining new
471
-
472
- = 2.0.1 =
473
- * UI changes
474
-
475
- = 2.0 =
476
- * Complete rewrite to use WPMU DEV's new fast and reliable API service.
477
- * New: One-click bulk smushing of all your images.
478
- * New: "Super-Smush" your images with our intelligent multi-pass lossy compression. Get over 2x more compression with almost no noticeable quality loss! (Pro)
479
- * New: Keep a backup of your original un-smushed images in case you want to restore later. (Pro)
480
- * UX/UI updated with overall stats, progress bar.
481
-
482
- = 1.7 =
483
- * Use Ajax for Bulk Smush to avoid timeouts and internal server error
484
- * Other Notice and bug fixes
485
- * Settings moved under Media > WP Smush.it
486
- * Added debug log file
487
-
488
- = 1.6.5.4 =
489
- * Added settings option to disable check for home url.
490
- * for PHP 5.4.x reordered class WpSmushit contructors to prevent Strict Standards Exception
491
-
492
- = 1.6.5.3 =
493
- * Removed check for file within local site home path.
494
-
495
- = 1.6.5.2 =
496
- * Corrected issues with Windows paths compare.
497
- * Added debug output option to help with user support issues.
498
-
499
- = 1.6.5.1 =
500
- * Correct Settings > Media issue causing settings to report warnings and not save.
501
- * Corrected some processing logic to better handling or image path. Images still need to be within ABSPATH of site
502
- * Correct image URL passed to Smush.it API to convert https:// urls to http:// since the API does not allow https:// images
503
-
504
-
505
- = 1.6.5 =
506
- * Codes reformatted and cleaned up into a php class
507
- * More texts are translatable now
508
-
509
- = 1.6.4 =
510
- * Fixed a bug that prevents execution
511
-
512
- = 1.6.3 =
513
- * check image size before uploading (1 MB limit)
514
- * attempt to smush more than one image before bailing (kind thanks to <a href="http://wordpress.org/support/profile/xrampage16">xrampage16</a>)
515
- * allow setting timeout value under `Media > Settings` (default is 60 seconds)
516
-
517
- = 1.6.2 =
518
- * about to get a new lease on life notice
519
-
520
- = 1.6.1 =
521
- * no longer maintained notice
522
-
523
- = 1.6.0 =
524
- * added setting to disable automatic smushing on upload (default is true)
525
- * on HTTP error, smushing will be temporarily disabled for 6 hours
526
-
527
- = 1.5.0 =
528
- * added basic integration for the <a href="http://wordpress.org/extend/plugins/wp-smushit-nextgen-gallery-integration/">NextGEN gallery plugin</a>
529
- * add support for media bulk action dropdown
530
- * compatibility with WordPress earlier than 3.1
531
- * added a <a href="http://dunae.ca/donate.html">donate link</a>
532
-
533
- = 1.4.3 =
534
- * cleaner handling of file paths
535
-
536
- = 1.4.2 =
537
- * bulk smush.it will no longer re-smush images that were successful
538
-
539
- = 1.4.1 =
540
- * bug fixes
541
-
542
- = 1.4.0 =
543
- * bulk smush.it
544
-
545
- = 1.3.4 =
546
- * bug fixes
547
-
548
- = 1.3.3 =
549
- * add debugging output on failure
550
-
551
- = 1.3.2 =
552
- * removed realpath() call
553
- * IPv6 compat
554
-
555
- = 1.3.1 =
556
- * handle images stored on other domains -- props to [ka-ri-ne](http://wordpress.org/support/profile/ka-ri-ne) for the fix
557
- * avoid time-out errors when working with larger files -- props to [Milan Dinić](http://wordpress.org/support/profile/dimadin) for the fix
558
-
559
- = 1.2.10 =
560
- * removed testing link
561
-
562
- = 1.2.9 =
563
- * updated Smush.it endpoint URL
564
-
565
- = 1.2.8 =
566
- * fixed path checking on Windows servers
567
-
568
- = 1.2.7 =
569
- * update to workaround WordPress's new JSON compat layer (see [trac ticket](http://core.trac.wordpress.org/ticket/11827))
570
-
571
- = 1.2.6 =
572
- * updated Smush.it endpoint URL
573
- * fixed undefined constant
574
-
575
- = 1.2.5 =
576
- * updated Smush.it endpoint URL
577
-
578
- = 1.2.4 =
579
- * removed debugging code that was interfering with the Flash uploader
580
-
581
- = 1.2.3 =
582
- * bug fix
583
-
584
- = 1.2.2 =
585
- * updated to use Yahoo! hosted Smush.it service
586
- * added security checks to files passed to `wp_smushit()`
587
-
588
- = 1.2.1 =
589
- * added support for PHP 4
590
- * created admin action hook as workaround to WordPress 2.9's `$_registered_pages` security (see [changeset 11596](http://core.trac.wordpress.org/changeset/11596))
591
- * add savings amount in bytes to Media Library (thx [Yoast](http://www.yoast.com/))
592
-
593
- = 1.2 =
594
- * added support for `WP_Http`
595
-
596
- = 1.1.3 =
597
- * fixed activation error when the PEAR JSON library is already loaded
598
-
599
- = 1.1.2 =
600
- * added test for `allow_url_fopen`
601
-
602
- = 1.1.1 =
603
- * added error message on PHP copy error
604
-
605
- = 1.1 =
606
- * improved handling of errors from Smush.it
607
- * added ability to manually smush images from media library
608
- * fixed inconsistent path handling from WP 2.5 -> WP 2.7
609
-
610
- = 1.0.2 =
611
- * added 'Not processed' status message when browsing media library
612
-
613
- = 1.0.1 =
614
- * added i10n functions
615
-
616
- = 1.0 =
617
- * first edition
618
 
619
  == About Us ==
620
  WPMU DEV is a premium supplier of quality WordPress plugins and themes. For premium support with any WordPress related issues you can join us here:
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
+ Version: 2.7.6
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
+ Tags: image, resize, optimize, optimise, compress, performance, optimisation, optimise JPG, photo, pictures, optimizer, Smush WordPress Compression, Smush.it
8
+ Requires at least: 4.6
9
+ Tested up to: 4.9.2
10
+ Stable tag: 2.7.6
11
  Requires PHP: 5.2.4
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
14
+ Compress and optimize (or optimise) image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
15
 
16
  == Description ==
17
 
18
+ <strong>Resize, optimize, optimise and compress all of your images with the incredibly powerful and 100% free WordPress image smusher, brought to you by the superteam at WPMU DEV!</strong>
19
 
20
+ (You say optimise I say optimize...lets call the whole thing off ;) )
21
+
22
+ = Award Winning Image Optimizer =
23
  Smush has been benchmarked and tested number one for speed and quality and is the <a href="https://torquemag.io/2017/04/wp-smush-defeats-wordfence-wins-plugin-madness-2017/">award-winning</a>, proven crowd favorite image optimization plugin for WordPress.
24
 
25
  Now with image resizing! Set a max width and height and large images will scale down as they are being compressed.
56
  “I had no idea that my page load time was being dragged down by the images. The plugin nearly halved the time it took.” - <a href="http://profiles.wordpress.org/karlcw">karlcw</a>
57
 
58
  ★★★★★ <br>
59
+ “I optimise my photos in Photoshop, but Smush makes it so easy – it does it automatically. I can just sit back and enjoy the speed.” - <a href="https://profiles.wordpress.org/helen432">helen432</a>
60
+
61
+ ★★★★★ <br>
62
+ “Smush helped reduce the total files size on my site and increased browsing speed. Well done guys!” - <a href="https://wordpress.org/support/users/pdci/">pdci</a>
63
 
64
  <strong>What about Multisite?</strong> WP Smush can be used to optimize all the images across your entire network! Use global settings or configure each site individually.
65
 
134
 
135
  Smush automatically handles optimizing all your images no matter where they come from and can be used as a standalone tool or alongside Photoshop.
136
 
137
+ = Is it optimize or optimise? =
138
+ It depends what side of the pond you live on...but wether you say optimize, optimise, optimizer or Smush goddess of speed this plugin will make sure your images are loading lighting fast.
139
+
140
  == Screenshots ==
141
 
142
+ 1. Watch as your image library is processed up to 50 images at a time.
143
+ 2. Set automatic smush to resize and optomize every image as it is uploaded.
144
+ 3. Smush will find and optimize images for you.
 
145
 
146
  == Installation ==
147
 
157
 
158
  == Changelog ==
159
 
160
+ = 2.7.6 =
161
+
162
+ * Security: Fixed path traversal vulnerability. Thanks Ricardo Sánchez(@neorichi) for responsible disclosure.
163
+
164
  = 2.7.5 =
165
 
166
  * Updated:
192
 
193
  = 2.7.3 =
194
 
195
+ * Fixed:
196
  * Manual Smush not working
197
  * Bulk Smush broken for few sites
198
 
229
  * WP RSS Aggregator compatibility for Auto Smush
230
  * WordPress mobile app Auto smush compatibility
231
 
232
+ = Earlier versions =
233
+ Please refer to the separate changelog.txt file.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
 
235
  == About Us ==
236
  WPMU DEV is a premium supplier of quality WordPress plugins and themes. For premium support with any WordPress related issues you can join us here:
wp-smush.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Smush
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
5
  Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
6
  Author: WPMU DEV
7
- Version: 2.7.5
8
  Author URI: http://premium.wpmudev.org/
9
  Text Domain: wp-smushit
10
  */
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
- $version = '2.7.5';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
5
  Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
6
  Author: WPMU DEV
7
+ Version: 2.7.6
8
  Author URI: http://premium.wpmudev.org/
9
  Text Domain: wp-smushit
10
  */
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
+ $version = '2.7.6';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );