PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / 1.7.7
Image Optimizer – Compress Images and Convert to WebP or AVIF v1.7.7
1.7.7 1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 All 33 releases
← All changes | modules/optimization/templates/details-view/optimized.php +32 -16 1.0.21.7.7 View file →
@@ -3,9 +3,9 @@
3 3 if ( ! defined( 'ABSPATH' ) ) {
4 4 exit; // Exit if accessed directly.
5 5 }
6 6
7 -use ImageOptimizer\Classes\File_Utils;
7 +use ImageOptimization\Classes\File_Utils;
8 8
9 9 ?>
10 10
11 11 <div class="image-optimization-control image-optimization-control--details-view image-optimization-control--optimized"
@@ -12,44 +12,60 @@
12 12 data-image-optimization-context="details-view"
13 13 data-image-optimization-status="optimized"
14 14 data-image-optimization-image-id="<?php echo esc_attr( $args['image_id'] ); ?>"
15 15 data-image-optimization-can-be-restored="<?php echo esc_attr( $args['can_be_restored'] ); ?>">
16 - <span class="setting image-optimizer-setting">
16 + <span class="setting image-optimization-setting">
17 17 <span class="name image-optimization-control__property">
18 - <?php esc_html_e( 'Status', 'image-optimizer' ); ?>:
18 + <?php esc_html_e( 'Status', 'image-optimization' ); ?>:
19 19 </span>
20 20
21 21 <span class="image-optimization-control__property-value">
22 - <?php esc_html_e( 'Optimized', 'image-optimizer' ); ?>
22 + <?php esc_html_e( 'Optimized', 'image-optimization' ); ?>
23 23 </span>
24 24 </span>
25 25
26 - <span class="setting image-optimizer-setting">
26 + <span class="setting image-optimization-setting">
27 27 <span class="name image-optimization-control__property">
28 - <?php esc_html_e( 'Image sizes optimized', 'image-optimizer' ); ?>:
28 + <?php esc_html_e( 'Image sizes optimized', 'image-optimization' ); ?>:
29 29 </span>
30 30
31 31 <span class="image-optimization-control__property-value">
32 - <?php echo esc_html( $args['sizes_optimized_count'] ); ?>
32 + <?php printf(
33 + '%d/%d',
34 + esc_html( $args['sizes_optimized_count'] ),
35 + esc_html( $args['sizes_total'] )
36 + ); ?>
37 +
38 + <button type="button"
39 + class="image-optimization-control__details-button"
40 + aria-label="<?php esc_html_e( 'Open optimization details', 'image-optimization' ); ?>">
41 + (+)
42 + </button>
33 43 </span>
34 44 </span>
35 45
36 - <span class="setting image-optimizer-setting">
46 + <span class="setting image-optimization-setting">
37 47 <?php if ( 0 === $args['saved']['absolute'] ) { ?>
38 48 <span class="name image-optimization-control__property"></span>
39 49
40 - <span class="name image-optimization-control__property-value">
41 - <?php esc_html_e( 'Image is fully optimized', 'image-optimizer' ); ?>
50 + <span class="name image-optimization-control__property-value" style="max-width: 50%;">
51 + <?php
52 + if ( $args['is_losseless_and_webp'] ) {
53 + esc_html_e( 'Requested WebP format is larger than the original file. Switch to Lossy in settings to convert this image in an optimized manner.', 'image-optimization' );
54 + } else {
55 + esc_html_e( 'Image is fully optimized', 'image-optimization' );
56 + }
57 + ?>
42 58 </span>
43 59 <?php } else { ?>
44 60 <span class="name image-optimization-control__property">
45 - <?php esc_html_e( 'Overall saving', 'image-optimizer' ); ?>:
61 + <?php esc_html_e( 'Overall saving', 'image-optimization' ); ?>:
46 62 </span>
47 63
48 64 <span class="image-optimization-control__property-value">
49 65 <?php
50 66 printf(
51 - esc_html__( '%1$s%% (%2$s)', 'image-optimizer' ),
67 + esc_html__( '%1$s%% (%2$s)', 'image-optimization' ),
52 68 esc_html( $args['saved']['relative'] ),
53 69 esc_html( File_Utils::format_file_size( $args['saved']['absolute'], 1 ) )
54 70 );
55 71 ?>
@@ -56,27 +72,27 @@
56 72 </span>
57 73 <?php } ?>
58 74 </span>
59 75
60 - <span class="setting image-optimizer-setting">
76 + <span class="setting image-optimization-setting">
61 77 <span class="name image-optimization-control__property"></span>
62 78
63 79 <span class="image-optimization-control__property-value image-optimization-control__property-value--button">
64 80 <button class="button button-link image-optimization-control__button image-optimization-control__button--reoptimize"
65 81 type="button">
66 - <?php esc_html_e( 'Reoptimize', 'image-optimizer' ); ?>
82 + <?php esc_html_e( 'Reoptimize', 'image-optimization' ); ?>
67 83 </button>
68 84 </span>
69 85 </span>
70 86
71 87 <?php if ( $args['can_be_restored'] ) { ?>
72 - <span class="setting image-optimizer-setting">
88 + <span class="setting image-optimization-setting">
73 89 <span class="name image-optimization-control__property"></span>
74 90
75 91 <span class="image-optimization-control__property-value image-optimization-control__property-value--button">
76 92 <button class="button button-link image-optimization-control__button image-optimization-control__button--restore-original"
77 93 type="button">
78 - <?php esc_html_e( 'Restore original', 'image-optimizer' ); ?>
94 + <?php esc_html_e( 'Restore original', 'image-optimization' ); ?>
79 95 </button>
80 96 </span>
81 97 </span>
82 98 <?php } ?>