How can I restrict image upload dimensions for non-admin WordPress users?

I’ve modified this answer from brasofilo. Modify the width and height values in the following line in the below code to your needs… $maximum = array( ‘width’ => 500, ‘height’ => 700 ); … and then add the code to your theme’s functions.php file. add_action( ‘admin_init’, ‘wpse_371740_block_authors_from_uploading_large_images’ ); function wpse_371740_block_authors_from_uploading_large_images() { if( !current_user_can( ‘administrator’) ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)