PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | inc/common/attachments.php +12 -1 2.3.2 → trunk View file →
@@ -66,9 +66,20 @@
66 66 * @since 1.9.8
67 67 * @since WP 5.3
68 68 * @author Grégory Viguier
69 69 */
70 -add_filter( 'big_image_size_threshold', [ imagify_get_context( 'wp' ), 'get_resizing_threshold' ], IMAGIFY_INT_MAX );
70 +add_filter( 'big_image_size_threshold', [ imagify_get_context( 'wp' ), 'filter_big_image_size_threshold' ], IMAGIFY_INT_MAX );
71 +
72 +/**
73 + * Note the uploads WordPress 7.1 hands to the browser, which scales them itself.
74 + *
75 + * Fires before the attachment metadata is generated, so the threshold filter above already
76 + * knows about it by the time it runs.
77 + *
78 + * @since 2.3.3
79 + * @since WP 7.1
80 + */
81 +add_action( 'rest_after_insert_attachment', [ imagify_get_context( 'wp' ), 'maybe_flag_client_side_scaling' ], 10, 3 );
71 82
72 83 /**
73 84 * Add filters to manage images formats that will be generated
74 85 *