If a fruit or vegetable looked bad but tasted the same, would you buy it? Walmart is betting you will.

The retail giant is partnering with a company called "I'm Perfect" that sells apples at a discount because the fruit has cosmetic imperfections that would usually get it thrown into the garbage.

>> Read more trending stories

When edible food is blemished by hail or high winds, not only does it often go uneaten, but it generally ends up in environmentally harmful landfills.

The Natural Resources Defense Council said "growers reported (cosmetic-related) losses ranging up to 20 percent of production in a given year, but it could be higher in years of bad weather."

But Walmart is looking to change that by getting in on the ugly food boom. The chain sold "Spuglies" or ugly potatoes in Texas and said it got positive feedback from customers.

Now, these non-aesthetically appealing apples will be sold in around 300 Walmart stores in Florida, and it seems like a good move for everyone.

Farmers can sell more of their crops, Walmart can provide more produce and consumers have a cheaper option for buying apples — even though they're slightly less Instagram-worthy.

This video includes clips from Walmart and images from Getty Images.