Image auto-scaling on upload : two sets of add_image_size(); depending on image width?

I just started to optimize the scaling of the images i upload on my wordpress (via Media tool). After a bit of research i tried to add this code i’ve found in my functions.php file and it’s working just fine : add_theme_support( ‘post-thumbnails’ ); add_action( ‘after_setup_theme’, ‘aw_custom_add_image_sizes’ ); function aw_custom_add_image_sizes() { add_image_size( ‘og’, 500, 9999…