Most buildings are equipped with various types of sensors to detect smoke in the event of a fire, though most are located internally. Practically, smoke has to reach the sensor in order for the sensor to react. The limitations of these sensors are their inability to respond in the early stages of a fire, and their questioned efficiency in accurately detecting the source of the smoke and locations in external environments. Image processing techniques are widely used in different critical applications in the domains of security, recognition, detection, etc. In this paper, we present an alternative image-based algorithm that can detect smoke in both indoor and outdoor environments. The algorithm operates over colored images to detect smoke at the early stages of a fire. The core of the algorithm relies on target extraction, color analysis and block subtraction components. Results shows that our proposed algorithm is capable of detecting smoke accurately at a rate of 95.10%, making it suitable for wide range of applications.