title: How change programmatically images sort order, in Magento
body: <p>I need to programmatically modify the sort order of existing product images.</p>
  
  <p>I tried to search for a working solution but I found nothing.</p>
  
  <p>I found how add an image in a media gallery via <code>addImageToMediaGallery</code>, but not how change properties (sort,label etc..) of existing media files.</p>