Disabled image resize calculations

This commit is contained in:
nomadics9 2025-03-31 22:45:42 +03:00
parent 85600f2209
commit c2f4d9e131

View file

@ -30,6 +30,11 @@ $wp_upload_dir = wp_upload_dir ();
! defined ( 'SOFTOBA_UPLOAD_ERR_NOT_A_IMAGE' ) && define ( 'SOFTOBA_UPLOAD_ERR_NOT_A_IMAGE', 21 );
! defined ( 'SOFTOBA_UPLOAD_ERR_WRONG_IMAGE_FORMAT' ) && define ( 'SOFTOBA_UPLOAD_ERR_WRONG_IMAGE_FORMAT', 22 );
// Disable srcset and sizes attributes
add_filter('wp_calculate_image_srcset', '__return_false');
add_filter('wp_calculate_image_sizes', '__return_false');
/**
* Enqueue styles
*/