prevented non pictures from being uploaded