master
if (is_file($path . '.jpg')) { $path .= '.jpg'; $zip->addFile($path, $photoAlbumName . '/' . basename($path)); continue; } elseif (is_file($path . '.png')) {