mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 01:24:27 +00:00
Media: Revert WebP generation.
Given [https://make.wordpress.org/core/2022/09/11/webp-in-core-for-6-1/ Matt's recent post about removing WebP from core] and possibly implementing the feature in a future [https://make.wordpress.org/core/2022/09/11/canonical-plugins-revisited/ "Canonical Plugin"], this change reverts changesets [54086], [54094], and [54097]. Additionally, [54210] contained a coding standards follow-up in one of the affected files that is no longer needed. Reverts [54086], [54094], and [54097]. Props SergeyBiryukov. See #55443. git-svn-id: https://develop.svn.wordpress.org/trunk@54226 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -917,12 +917,10 @@ function wp_save_image( $post_id ) {
|
||||
}
|
||||
|
||||
// Save the full-size file, also needed to create sub-sizes.
|
||||
$saved = wp_save_image_file( $new_path, $img, $post->post_mime_type, $post_id );
|
||||
if ( ! $saved ) {
|
||||
if ( ! wp_save_image_file( $new_path, $img, $post->post_mime_type, $post_id ) ) {
|
||||
$return->error = esc_js( __( 'Unable to save the image.' ) );
|
||||
return $return;
|
||||
}
|
||||
$new_path = $saved['path'];
|
||||
|
||||
if ( 'nothumb' === $target || 'all' === $target || 'full' === $target || $scaled ) {
|
||||
$tag = false;
|
||||
|
||||
Reference in New Issue
Block a user