first of all we need to find an existing controller and we can insert this zipAction function on that controller
we can call this function as their front name of xml file and an index after that we can call this as zip

<a href="” class=”blueButton”>Download All Images

here mangeteam as their front name in xml
index is same
zip is zip action

$_product = Mage::getModel(‘catalog/product’)->load($pid);
foreach ($_product->getMediaGalleryImages() as $image) :
array_push($file_arr, (string) Mage::helper(‘catalog/image’)->init($_product, ‘image’, $image->getFile()));
$zip = new ZipArchive;
$res = $zip->open($zipname, ZipArchive::CREATE);
if ($res === TRUE) {
foreach ($file_arr as $file) {
$download_file = file_get_contents($file);
$zip->addFromString(basename($file), $download_file);
header(‘Content-Type: application/zip’);
header(‘Content-Length: ‘ . filesize($zipname));
header(‘Content-Disposition: attachment; filename=”‘.$zipname.'”‘);