title: PHP Wordpress dynamic custom image sizes
body: <p>wordpress has a good support for images in general.</p>
  
  <p>to get new image sizes, one would just add some functions like :</p>
  
  <pre><code>add_theme_support( 'post-thumbnails' ); //thumnails
  set_post_thumbnail_size( 200, 120, true ); // Normal post thumbnails
  add_image_size( 'single-post-thumbnail', 400, 300,False ); // single-post-test
  add_image_size( 'tooltip', 100, 100, true ); // Tooltips thumbnail size
  /// and so on and so on 
  </code></pre>
  
  <p>my question is : </p>
  
  <p>How can someone make those functions act in a dynamic manner , meaning that those sizes will be calculated on upload ?</p>
  
  <p>for example - If I upload an image of 3000x4000 px - I would like my image sizes to be :</p>
  
  <pre><code> add_image_size( 'half', 50%, 350%, False ); // Half the original
   add_image_size( 'third', 30%, 30%, true ); // One Third the original
  </code></pre>
  
  <p>Is there a way to do that ? where can I hook for that ?
  Those image sizes are used registered in many functions -
  Can someone think of an Uber-creative way to achieve that ?</p>