title: Wordpress - Responsive images - remove sizes
body: <p>Sometime ago I added a couple of additional image formats to Wordpress in order to fine-tune my responsive display. I added those lines to functions.php:</p>
  
  <pre><code>add_image_size( "maximal", "1900" );
  add_image_size( "desktop", "1400" );
  add_image_size( "tablet", "900" );
  add_image_size( "smalltablet", "700" );
  add_image_size( "mobile", "500" );
  add_theme_support( 'post-thumbnails' ); 
  </code></pre>
  
  <p>I release I was too greedy because I'm not using most of those formats now and I would like to remove some of them. To do so I basically commented the image formats that I wanted to get rid of but from what I see, all srcset attributes are still listing them in my code.</p>
  
  <p>Is there a way to tell Wordpress to stop adding those formats in srcset ? I thought of using a regex to get rid of them but that generates additional processing to the page.</p>
  
  <p>Thanks</p>
  
  <p>Laurent</p>