The Prophet Muhammad (SAWA) and his Progeny Ahlul Bayt (AS) were always for freedom of slaves and they freed all slaves who they could free.
Islam came when the whole world societies were full of slavery. Islam abolished slavery in a systematic and realistic way. Europe and America continued insulating people from Africa centuries after Muslim societies were totally free from slavory.
Wassalam..