We have modified a field XML name and then see that all components with that schema is missing the images, whose XML field was modified. Is there a way to prevent loss of data in such scenarios?
The Component content is stored in XML format in the DB.
If you update a schema XML name then the XML for that component no longer maps to that new field.
- You can synchronize the content against the updated schema.  
- If you're not allowed to do that, then you could create a new field and write something to copy the content of the original field (not yet removed) to the new field for each component using that schema. Then remove the old field.
- If you're Content Porting during this change you will need to be careful to align the schemas, and/or have synchronization checked
 A point to note is when you make the schema update, there is no immediate impact to the Component XML. If, however, you open a specific Component and resave - then the XML will have been updated and the XML element (and therefore the content) pertaining to the previous field will be removed. It still exists in history but it's likely you're in a world of pain at that point ;)