The assurance is part of the settlement of a class-action lawsuit filed against the restaurant chain after an Australian teenager posted a picture of an 11-inch sandwich on Facebook in 2013. The New York Post found that four of seven "footlongs" it purchased measured 11 or 11.5 inches.

The settlement was initially agreed to in October. Final approval came on Feb. 25.

U.S. District Judge Lynn Adelman, of Wisconsin, approved $520,000 in attorney's fees and $500 for each of the 10 people who were representatives of the class. No money was awarded to potential members of the class.

>> Read more trending stories

Adelman wrote that the plaintiffs' attorneys realized that their claims "were quite weak" and focused on making sure Doctor's Associates, Subway's parent company, would ensure that its sandwiches are at least 12 inches long.

"This allows us to move forward, without distractions, on our goal to provide great-tasting sandwiches and salads, made exactly as each guest likes," according to a statement from Subway. "We have already taken steps to ensure each guest receives the footlong or 6-inch sandwich they order."

While the dough might have different shapes, it still has the same quantity of ingredients, Adelman wrote. She noted that the shorter bread could lead to slightly fewer toppings but she added that the sandwiches are made in front of the customer, who can ask for more.

Still, Subway is taking steps to ensure that the bread is 12 inches long, including requiring restaurants to use a ""tool for measuring bread."

The company recently ended its $5 Footlong promotion, citing increasing costs for raising the price to $6.