They may physically fit in a Spanish wall socket (it depends on the design of the socket), but if they do there won't be any earth connection.
French sockets have a pin sticking out which is the earth, and this prevents some types of Euro plugs being inserted.
Spanish sockets have earth connections top and bottom and the plugs have corresponding grooves with recessed earth connectors. As the plugs in the picture don't have these grooves top and bottom, they will be a tight fit in a Spanish socket and they'll only go in the socket if the earth connectors in the socket are capable of being pushed fully out of the way. Spanish sockets also have flats on the sides that hold the two pin plugs securely and these would prevent the French plug being inserted, although I have seem some Spanish sockets that don't have these (which is why I said it depends on the design of the socket). Forcing a French plug into a Spanish socket could permanently damage the earth connectors ion the socket, which is never a good thing.
There are some universal Euros plugs that have a hole to accommodate the French earth pin, and recesses/earth connectors top and bottom to work correctly with Spanish sockets. Having this type of plug is very handy if you're travelling through France.
The French plugs are known as Type "E"
https://www.iec.ch/worldplugs/typeE.htmSpanish plugs are Type "F"
https://www.iec.ch/worldplugs/typeF.htmPete.