This is how I solved the problem and works great. Besides your changes, that too.
1. In Mage_Catalog_Model_Product_Attribute_Backend_Media
change
public function addImage(Mage_Catalog_Model_Product $product, $file, $mediaAttribute = null, $move = false, $exclude = true)
to
public function addImage(Mage_Catalog_Model_Product $product, $file, $mediaAttribute = null, $move = false, $exclude = true, $page = false)
change
public function addImagesWithDifferentMediaAttributes(Mage_Catalog_Model_Product $product, $fileAndAttributesArray, $filePath = '', $move = false, $exclude = true)
to
public function addImagesWithDifferentMediaAttributes(Mage_Catalog_Model_Product $product, $fileAndAttributesArray, $filePath = '', $move = false, $exclude = true, $page = true)
change
$savedFileName = $this->addImage($product, $filePath . $value['file'], null, $move, $exclude);
to
$savedFileName = $this->addImage($product, $filePath . $value['file'], null, $move, $exclude, $page );
2. Go to Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media
change
array('label','position','disabled')
to
array('label','position','disabled','page')
change
array( 'label_default' => 'label', 'position_default' => 'position', 'disabled_default' => 'disabled', )
to
array( 'label_default' => 'label', 'position_default' => 'position', 'disabled_default' => 'disabled', 'page_default' => 'page' )
3. In js / mage / adminhtml / product.js
change
this.getFileElement(file, 'cell-label input').value = image.label; this.getFileElement(file, 'cell-position input').value = image.position; this.getFileElement(file, 'cell-remove input').checked = (image.removed == 1); this.getFileElement(file, 'cell-disable input').checked = (image.disabled == 1);
to
this.getFileElement(file, 'cell-label input').value = image.label; this.getFileElement(file, 'cell-position input').value = image.position; this.getFileElement(file, 'cell-remove input').checked = (image.removed == 1); this.getFileElement(file, 'cell-disable input').checked = (image.disabled == 1); this.getFileElement(file, 'cell-page input').checked = (image.page == 1);
change
this.images[index].label = this .getFileElement(file, 'cell-label input').value; this.images[index].position = this.getFileElement(file, 'cell-position input').value; this.images[index].removed = (this.getFileElement(file, 'cell-remove input').checked ? 1 : 0); this.images[index].disabled = (this.getFileElement(file, 'cell-disable input').checked ? 1 : 0);
to
this.images[index].label = this .getFileElement(file, 'cell-label input').value; this.images[index].position = this.getFileElement(file, 'cell-position input').value; this.images[index].removed = (this.getFileElement(file, 'cell-remove input').checked ? 1 : 0); this.images[index].page = (this.getFileElement(file, 'cell-page input').checked ? 1 : 0); this.images[index].disabled = (this.getFileElement(file, 'cell-disable input').checked ? 1 : 0);
Just use the search text to find where you can change the code. Hope this helps.