public static function normalize_filename($input) {
		if (empty($input)) {
			return false;
		}

		$pathinfo = pathinfo($input);

		// Normalize extension.
		$ext = mb_strtolower($pathinfo['extension']);
		if ($ext === 'jpeg') {
			$ext = 'jpg';
		}

		// Rebuild filename.
		$filename = $pathinfo['filename'].'.'.$ext;

		// Sanitize.
		$filename = static::sanitize_filename($filename);

		return $filename;
	}