Update deleted object or object that pass away

I work on home project that has server-side API and client UI. Regardless of the techincal side, my question is about user reaction of the following situations (and how to handlie it):

  • What if user change object that is already deleted?
  • And if UI tracks objects state and remove or modify objects automatically from UI. Won't it be like "I saw there an object, where is it right now?"

For example, we have online photo gallery, that could be modified by group of people. How to handle situation when someone has deleted a photo just before user submit changes to that photo? Or if it deletes automatically from UI. Will user be puzzled looking for a photo that was here few seconds ago?

Thanks for your answers.