Compress JPEG & PNG images - Version 2.2.6

Version Description

  • Fixed bug in compression of file types other than JPEG and PNG that have a thumbnail generated automatically.
Download this release

Release Info

Developer TinyPNG
Plugin Icon 128x128 Compress JPEG & PNG images
Version 2.2.6
Comparing to
See all releases

Code changes from version 2.2.5 to 2.2.6

readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: TinyPNG
3
  Donate link: https://tinypng.com/
4
  Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, wordpress app
5
  Requires at least: 3.0.6
6
- Tested up to: 4.8
7
- Stable tag: 2.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -40,7 +40,7 @@ After you upload an image to your WordPress site, each resized image is uploaded
40
 
41
  = Getting started =
42
 
43
- Install this plugin and obtain your free API key from https://tinypng.com/developers. With a free account you can optimize **roughly 100 images each month** (based on a regular WordPress installation). The exact total depends on the number of thumbnail sizes that are in use in your WordPress installation. You can change which of the generated thumbnail sizes should be optimized in the *Settings > Media* page. If you’re a heavy user you can optimize more images for a small additional fee.
44
 
45
  = Optimizing all your images =
46
 
@@ -48,7 +48,7 @@ You can optimize all your JPEG and PNG images at once by going to *Media > Bulk
48
 
49
  = Multisite support =
50
 
51
- The API key can optionally be configured in wp-config.php. This removes the need to set a key on each site individually in your multisite network.
52
 
53
  = Contact us =
54
 
@@ -80,7 +80,11 @@ Want to contribute? Check out the [Tinify Wordpress plugin on GitHub](https://gi
80
 
81
  = Optional configuration =
82
 
83
- The API key can also be configured in wp-config.php. You can add a `TINY_API_KEY` constant with your API key. Once set up you will see a message on the media settings page. This will work for normal and multisite WordPress installations.
 
 
 
 
84
 
85
  == Screenshots ==
86
 
@@ -94,6 +98,9 @@ The API key can also be configured in wp-config.php. You can add a `TINY_API_KEY
94
  = Q: How many images can I optimize for free? =
95
  A: In a default WordPress installation you can optimize around 100 images for free each month. WordPress creates different thumbnails of your images which all have to be compressed. Some plugins even add more sizes, so take a look at the *Settings > Media* page before you start optimization.
96
 
 
 
 
97
  = Q: What happens to the optimized images when I uninstall the plugin? =
98
  A: When you remove the plugin all your optimized images will remain optimized.
99
 
@@ -103,13 +110,25 @@ A: When you upload an image to your website, WordPress will create different siz
103
  = Q: Is there a file size limit? =
104
  A: No. There are no limitations on the size of the images you want to compress.
105
 
 
 
 
 
 
 
106
  = Q: What happens when I reach my monthly limit? =
107
- A: Everything will keep on working, but newly uploaded images will not be optimized. Of course we encourage everyone to sign up for a paid account to cover the hosting and development costs of the service.
108
 
109
  = Q: Can I optimize all existing images in my media library? =
110
  A: Yes! After installing the plugin, go to *Media > Bulk Optimization*, and click on the start button to optimize all unoptimized images in your media library.
111
 
 
 
 
112
  == Changelog ==
 
 
 
113
  = 2.2.5 =
114
  * Fixed bug in bulk optimization page that could sometimes cause it to stop.
115
  * Fixed a problem that would prevent dashboard widget from loading.
3
  Donate link: https://tinypng.com/
4
  Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, wordpress app
5
  Requires at least: 3.0.6
6
+ Tested up to: 4.9
7
+ Stable tag: 2.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
40
 
41
  = Getting started =
42
 
43
+ Install this plugin and follow the instructions to set up your account. With a regular WordPress installation you can optimize **roughly 100 images each month** for free. The exact total depends on the number of thumbnail sizes that are in use in your WordPress installation. You can change which of the generated thumbnail sizes should be optimized in the *Settings > Media* page. Once installed you can also switch to a [paid account](https://tinypng.com/dashboard/developers) to remove the limits and optimize as many images as you like.
44
 
45
  = Optimizing all your images =
46
 
48
 
49
  = Multisite support =
50
 
51
+ The plugin is fully multisite compatible and you can set the API key for all sites at once by defining it in the *wp-config.php* file. View the installation instructions for more information.
52
 
53
  = Contact us =
54
 
80
 
81
  = Optional configuration =
82
 
83
+ The API key can also be configured in your *wp-config.php* file. To do this you can add the following PHP code that sets the API key.
84
+
85
+ `define( 'TINY_API_KEY', 'YOUR_API_KEY_HERE' );`
86
+
87
+ Once set up you will see a message on the *Settings > Media* page. This will work for normal and multisite WordPress installations.
88
 
89
  == Screenshots ==
90
 
98
  = Q: How many images can I optimize for free? =
99
  A: In a default WordPress installation you can optimize around 100 images for free each month. WordPress creates different thumbnails of your images which all have to be compressed. Some plugins even add more sizes, so take a look at the *Settings > Media* page before you start optimization.
100
 
101
+ = Q: How can I remove the 500 limit? =
102
+ A: Just add your *Payment details* on your [account dashboard](https://tinypng.com/dashboard/developers) to remove the limit. For a small fee the additional compressions above 500 will then be charged to your account at the end of each month.
103
+
104
  = Q: What happens to the optimized images when I uninstall the plugin? =
105
  A: When you remove the plugin all your optimized images will remain optimized.
106
 
110
  = Q: Is there a file size limit? =
111
  A: No. There are no limitations on the size of the images you want to compress.
112
 
113
+ = Q: Can I use the same API key on all my websites? =
114
+ A: Yes, there are no limitations. You can add the same key everywhere.
115
+
116
+ = Q: Can I hide my API key from the admin? =
117
+ A: Yes, you can hide your API key from the admin so other admin users will not be able to see it. To do this you should define the API key in your *wp-config.php* file. See the installation instructions for more information.
118
+
119
  = Q: What happens when I reach my monthly limit? =
120
+ A: Everything will keep on working, but newly uploaded images will not be optimized. Of course we encourage everyone to [switch](https://tinypng.com/dashboard/developers) to a paid account to cover the hosting and development costs of the service.
121
 
122
  = Q: Can I optimize all existing images in my media library? =
123
  A: Yes! After installing the plugin, go to *Media > Bulk Optimization*, and click on the start button to optimize all unoptimized images in your media library.
124
 
125
+ = Q: How do I switch to a paid account? =
126
+ A: You can upgrade to a paid account by adding your *Payment details* on your [account dashboard](https://tinypng.com/dashboard/developers). Additional compressions above 500 will then be charged at the end of each month as a one-time fee.
127
+
128
  == Changelog ==
129
+ = 2.2.6 =
130
+ * Fixed bug in compression of file types other than JPEG and PNG that have a thumbnail generated automatically.
131
+
132
  = 2.2.5 =
133
  * Fixed bug in bulk optimization page that could sometimes cause it to stop.
134
  * Fixed a problem that would prevent dashboard widget from loading.
src/class-tiny-image.php CHANGED
@@ -74,6 +74,7 @@ class Tiny_Image {
74
  $filenames = array();
75
 
76
  if ( is_array( $this->wp_metadata )
 
77
  && isset( $this->wp_metadata['sizes'] )
78
  && is_array( $this->wp_metadata['sizes'] ) ) {
79
 
74
  $filenames = array();
75
 
76
  if ( is_array( $this->wp_metadata )
77
+ && isset( $this->wp_metadata['file'] )
78
  && isset( $this->wp_metadata['sizes'] )
79
  && is_array( $this->wp_metadata['sizes'] ) ) {
80
 
src/class-tiny-plugin.php CHANGED
@@ -18,7 +18,7 @@
18
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
  */
20
  class Tiny_Plugin extends Tiny_WP_Base {
21
- const VERSION = '2.2.5';
22
  const MEDIA_COLUMN = self::NAME;
23
  const DATETIME_FORMAT = 'Y-m-d G:i:s';
24
 
18
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
  */
20
  class Tiny_Plugin extends Tiny_WP_Base {
21
+ const VERSION = '2.2.6';
22
  const MEDIA_COLUMN = self::NAME;
23
  const DATETIME_FORMAT = 'Y-m-d G:i:s';
24
 
tiny-compress-images.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Compress JPEG & PNG images
4
  * Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
5
- * Version: 2.2.5
6
  * Author: TinyPNG
7
  * Author URI: https://tinypng.com
8
  * Text Domain: tiny-compress-images
2
  /**
3
  * Plugin Name: Compress JPEG & PNG images
4
  * Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
5
+ * Version: 2.2.6
6
  * Author: TinyPNG
7
  * Author URI: https://tinypng.com
8
  * Text Domain: tiny-compress-images