Offering Salah outside the Masjid in cases of necessity

A: if the Masjid does not encompass the praying people during Jumu‘ah (Friday) Prayer or other Salahs, it is permissible for these people to offer Salah outside the Masjid on the condition that they can see the Imam or some of those who offer Salah behind him and can hear the Takbir (saying: "Allahu Akbar [Allah is the Greatest]") so that they can follow the Imam.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.