PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | vendor/rosell-dk/webp-convert/src/Convert/Converters/ConverterTraits/EncodingAutoTrait.php +16 -16 3.2.21 → 4.7.0 View file →
@@ -66,26 +66,26 @@
66 66 $this->log('Reduction: ');
67 67 $this->logReduction($this->getSource(), $destinationLossless);
68 68 $this->ln();
69 69
70 - if (file_exists($destinationLossless) && file_exists($destinationLossy)) {
71 - if (filesize($destinationLossless) > filesize($destinationLossy)) {
72 - $this->logLn('Picking lossy');
73 - unlink($destinationLossless);
74 - rename($destinationLossy, $destination);
75 - } else {
76 - $this->logLn('Picking lossless');
77 - unlink($destinationLossy);
78 - rename($destinationLossless, $destination);
79 - }
70 + if (file_exists($destinationLossless) && file_exists($destinationLossy)) {
71 + if (filesize($destinationLossless) > filesize($destinationLossy)) {
72 + $this->logLn('Picking lossy');
73 + unlink($destinationLossless);
74 + rename($destinationLossy, $destination);
80 75 } else {
81 - if (file_exists($destinationLossless)) {
82 - rename($destinationLossless, $destination);
83 - }
84 - if (file_exists($destinationLossy)) {
85 - rename($destinationLossy, $destination);
86 - }
76 + $this->logLn('Picking lossless');
77 + unlink($destinationLossy);
78 + rename($destinationLossless, $destination);
87 79 }
80 + } else {
81 + if (file_exists($destinationLossless)) {
82 + rename($destinationLossless, $destination);
83 + }
84 + if (file_exists($destinationLossy)) {
85 + rename($destinationLossy, $destination);
86 + }
87 + }
88 88 $this->setDestination($destination);
89 89 $this->setOption('encoding', 'auto');
90 90 }
91 91