protected function _loop($identifier, $options, $action) {
		$count = $this->_getCount($identifier);
		$offset = 0;
		$limit = $this->params['limit'];

		$this->out(__d('file_storage', '{0} record(s) will be processed.' . "\n", $count));

		do {
			$records = $this->_getRecords($identifier, $limit, $offset);
			if (!empty($records)) {
				foreach ($records as $record) {
					$method = '_' . $action . 'Image';
					try {
						$this->{$method}($record, $options);
					} catch (StorageException $e) {
						$this->err($e->getMessage());
					}
				}
			}
			$offset += $limit;
			$this->out(__d('file_storage', '{0} of {1} records processed.', [$limit, $count]));
		} while ($records->count() > 0);
	}