Adds the ability to programmatically specify the JPG quality of individual custom image sizes in WordPress.
Perfect for keeping the filesize of retina images down, among other things.
Typically, you would use this code for defining custom image sizes:
add_image_size( 'custom-size', 500, 300, true );
This plug-in lets you do this:
set_image_size_quality( 'custom-size', 40 );
Just copy the whole "custom-image-size-quality" folder into your "wp-content/plugins" folder. Then activate the plug-in in wp-admin as usual.
I found the hook approach at this informative URL:
I then prettied it up and formed a plugin out of it. Modified the scaling to use WP's own Image Editor functionality, which will then use GD or ImageMagick (or other custom editor) based on availability and preferences.
- Fixed a critical bug that caused multiple sizes to crop based on the previous size dimensions.
- Changed hook approach to use a filter hook ("update_post_metadata"), which will trigger not only on uploads, but also on updates, making this plugin more compatible with plugins like "Regenerate Thumbnails".
Why don't you just send those to [email protected]?