Changeset 826421
- Timestamp:
- 12/21/2013 04:07:53 AM (11 years ago)
- Location:
- wp-resized-image-quality/trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-resized-image-quality/trunk/readme.txt
r736889 r826421 2 2 Contributors: mbijon 3 3 Tags: image, thumbnail, compression, quality, YSlow, PageSpeed, bandwidth, jpeg, jpg, size, file, storage, uploader, uploaded, imagemagick, gd library 4 Requires at least: 2.75 Tested up to: 3. 6-beta46 Stable tag: 2. 04 Requires at least: 5 Tested up to: 3. 6 Stable tag: 2. 7 7 8 8 Get better uploaded quality or save bandwidth: Change the JPEG compression-level of uploaded images and thumbnails. 9 9 10 10 11 == Description == … … 12 13 Get better uploaded quality or save bandwidth: Change the JPEG compression-level of uploaded images and thumbnails. 13 14 14 The WP Resized Image Quality plugin lets youchange the compression-level of uploaded JPEG images and thumbnails. Set it for maximum quality when you want images to look their best, or take advantage of lower quality settings to save bandwidth.15 change the compression-level of uploaded JPEG images and thumbnails. Set it for maximum quality when you want images to look their best, or take advantage of lower quality settings to save bandwidth. 15 16 16 The admin page uses an easy slider to set the compression level, making this easier to use than other compression plugins or functions.php settings. 17 The only interface is a slider aqdded to the Settings > Media admin page, making this easier to use than other compression plugins or functions.php settings. 18 17 19 18 20 == Installation == 19 21 20 1. Install 'WP Resized Image Quality' through the WordPress.org plugin directory, or by uploading the files to your server21 2. After activating the Plugin, change your image quality settings on the Settings page in WP-Admin: Settings > Image Quality22 1. Install 'WP Resized Image Quality' through the WordPress.org plugin directory, 23 2. After activating the Plugin, change your image quality settings on the Settings page in WP-Admin: Settings > 22 24 3. That's it. You're ready to go! 25 23 26 24 27 = Requirements = … … 26 29 * PHP 5.2 or above 27 30 * WordPress 3.1 or above 31 32 28 33 29 34 == Frequently Asked Questions == 35 36 37 38 39 40 41 42 43 44 30 45 31 46 = How can I update JPEGs uploaded before installing this plugin at a different setting? = … … 33 48 First, install this plugin and choose your new compression level. Then install the Regenerate Thumbnails plugin, http://wordpress.org/plugins/regenerate-thumbnails/, and run it. All the regenerated thumbnails will be compressed at the compression % from this plugin. 34 49 35 = What was the default image quality in WordPress? =36 37 The default image compression setting for JPEGs is 90%.38 50 39 51 = What happens to uploaded images if I turn the plugin off? = 40 52 41 After you deactivate the custom compression setting will be removed and all new images will use WP's default 90% compression setting. Images uploaded while the plugin was active will stay at their old compression level. 53 Images uploaded while the plugin was active will stay at their original/old compression level (to recompress them, I recommend the Regenerate Thumbnails plugin). After you deactivate the custom compression setting will be removed and all new images will use WP's default 90% compression setting. 54 42 55 43 56 = Does this plugin compress PNG files? = 44 57 45 Unfortunately, it doesn't. All the PNG compression tools I've found aren't standard on most servers. You would need root access and a more-complicated plugin to get PNG compression working. 58 No, it doesn't. All the PNG compression tools I've found aren't standard on most servers. You would need root access and a more-complicated plugin to get PNG compression working. 59 60 46 61 47 62 == Screenshots == 48 63 49 64 1. No complicated media/compression interface. Just one slider added to the Settings > Admin page 50 2. Admin page with one setting, simple enough 65 51 66 52 67 == Changelog == 68 69 70 71 72 53 73 54 74 = 2.0 = -
wp-resized-image-quality/trunk/templates/riq-admin-page-template.php
r736889 r826421 20 20 <tr> 21 21 <td colspan="2"> 22 <?php $sm_url = admin_url( 'options-media.php' ); ?> 23 <h3>Plugin Version 2.0, Update Note:</h3> 24 <p>The slider below was added to the <a href="<?php echo $sm_url; ?>">Settings > Media page</a> in version 2.0. 25 <br /> 26 In version 3.0 this screen will be removed and the slider will only be on the <a href="<?php echo $sm_url; ?>">Settings > Media page</a>.</p> 22 <div class="widgets-holder-wrap" style="padding: 0 10px 10px;"> 23 <?php $sm_url = admin_url( 'options-media.php' ); ?> 24 <h3>Plugin, Future Update Note:</h3> 25 <p>The slider below has been added to the <a href="<?php echo $sm_url; ?>">Settings > Media page</a> 26 <br /><br /> 27 In version 3.0 this screen will be removed and the slider will <strong>*only*</strong> be on the <a href="<?php echo $sm_url; ?>">Settings > Media page</a></p> 28 </div> 27 29 </td> 28 30 </tr> 29 31 <tr> 30 32 <th> 31 <strong><?php _e( 'JPEG Quality %', 'wp-resized-image-quality' ); ?></strong>33 <strong><?php _e( 'JPEG Quality', 'wp-resized-image-quality' ); ?></strong> 32 34 </th> 33 35 <td> 34 36 <div> 35 <input type="text" class="riq-amount" id="riq-amount" style="border: 0; font-weight: bold;" /> 36 <br /> 37 <?php _e( 'The default compression setting in WordPress is 90%', 'wp-resized-image-quality' ); ?> 37 Compression %: <input type="text" class="riq-amount" id="riq-amount" style="font-weight: bold; background-color: transparent; border: none; box-shadow: none;" /> 38 38 </div> 39 39 </td> … … 43 43 <div class="riq-slider" id="riq-slider" style="width:400px;"></div> 44 44 <input type="hidden" name="riq-integer" id="riq-integer" value="<?php echo $this->jpeg_quality; ?>" /> 45 46 47 45 48 </td> 46 49 </tr> -
wp-resized-image-quality/trunk/templates/riq-media-option-template.php
r736889 r826421 5 5 6 6 <div> 7 C urrent Compression %: <input type="text" class="riq-amount" id="riq-amount" style="border: 0; font-weight: bold;" />7 C;" /> 8 8 <br /> 9 9 -
wp-resized-image-quality/trunk/wp-resized-image-quality.php
r736889 r826421 2 2 /************************************************************************ 3 3 Plugin Name: WP Resized Image Quality 4 Plugin URI: http://www. geekcoded.com/plugin/wp-resized-image-quality/4 Plugin URI: http://www. 5 5 Description: Change the compression-level of uploaded images and thumbnails. Get better image quality or save bandwidth. 6 Version: 2. 07 Author: Mike Bijon, GeekCoded8 Author URI: http://www.mbijon.com/about -mike-bijon/6 Version: 2. 7 Author: Mike Bijon, 8 Author URI: http://www.mbijon.com/about 9 9 License: GPLv2 10 10 … … 29 29 ************************************************************************/ 30 30 31 if ( ! class_exists( 'WP_Resized_Image_Quality') ) :31 if ( ! class_exists() ) : 32 32 33 33 class WP_Resized_Image_Quality { … … 51 51 */ 52 52 const RIQ_PLUGIN_VERSION = '2.0'; 53 54 55 56 57 53 58 54 59 … … 78 83 // The whole reason we're here 79 84 add_filter( 'jpeg_quality', array( $this, 'get_jpeg_quality_setting' ) ); 85 80 86 81 87 load_plugin_textdomain( 'wp-resized-image-quality', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); … … 162 168 $jpeg_quality = (int)90; 163 169 164 set_transient( 'riq_jpeg_quality', $jpeg_quality, 60 * 60 * 24);170 set_transient( 'riq_jpeg_quality', $jpeg_quality, ); 165 171 166 172 } … … 195 201 $jpeg_quality = (int)90; 196 202 197 set_transient( 'riq_jpeg_quality', $jpeg_quality, 60 * 60 * 24);203 set_transient( 'riq_jpeg_quality', $jpeg_quality, ); 198 204 199 205 } … … 247 253 $jpeg_quality = (int)90; 248 254 249 set_transient( 'riq_jpeg_quality', $jpeg_quality, 60 * 60 * 24);255 set_transient( 'riq_jpeg_quality', $jpeg_quality, ); 250 256 } 251 257 … … 261 267 262 268 $this->jpeg_quality = intval( $jpeg_quality ); 263 set_transient( 'riq_jpeg_quality', intval( $jpeg_quality ), 60 * 60 * 24);269 set_transient( 'riq_jpeg_quality', intval( $jpeg_quality ), ); 264 270 265 271 return true;
Note: See TracChangeset
for help on using the changeset viewer.