public static function generateHashes($configPath = 'FileStorage') {
		if (is_array($configPath)) {
			$imageSizes = $configPath;
		} else {
			$imageSizes = Configure::read($configPath . '.imageSizes');
		}
		if ($imageSizes === null) {
			throw new RuntimeException(sprintf('Image processing configuration in `%s` is missing!', $configPath . '.imageSizes'));
		}

		static::ksortRecursive($imageSizes);
		foreach ($imageSizes as $model => $version) {
			foreach ($version as $name => $operations) {
				Configure::write($configPath . '.imageHashes.' . $model . '.' . $name, static::hashOperations($operations));
			}
		}

		return Configure::read($configPath . '.imageHashes');
	}