You have to provide two photos along with the other papers for the visa application. If the photo does not correspond to at least one of the Spanish visa photo requirements, the package of documents will be considered incomplete and you will have to apply again.