Outliers and missing data are commonly found in satellite imagery. These are usually caused by atmospheric or electronic failures, hampering the correct monitoring of remote-sensing data. To avoid distorted data, we propose a procedure called "spatial functional prediction" (SFP). The SFP procedure consists of the following: 1) aggregating remote-sensing data for reducing the number of missing data and/or outliers; 2) additively decomposing the time series of images into a trend, a seasonal, and an error component; 3) defining the spatial functional data and predicting the trend component using an ordinary kriging; and 4) adding back the seasonal and error components to the predicted trend. The benefits of the SFP procedure are illustrated in the following scenarios: introducing random outliers, random missing data, mixtures of both, and artificial clouds in an extensive simulation study of composite images, and using daily images with real clouds. The following two derived variables are considered: land surface temperature (LST day) and normalized vegetation index (NDVI), which are obtained as remote-sensing data in a region in northern Spain during 2003-2016. The performance of SFP was checked using the root mean square error (RMSE). A comparison with a procedure based on predicting with thin-plate splines (TpsP) is also made. We conclude that SFP is simpler and faster than TpsP, and provides smaller values of RMSE.