Recovering Deleted Images?

Hi there! I was wondering if anyone knew a way to recover deleted images from an observation?

Essentially I was programming an applet to make it easy for me to tag observations with a certain tag, but it actually seems to have unlinked the photos on those observations while doing it. You can see on this observation, for example:

https://www.inaturalist.org/observations/13627551

I should be able to recover most of the photos from my computer/phone, but just in case there is an easier way, or if images are stored on iNat in a way which makes it easy to relink them.

Frustrating, but my own fault!

How long ago were they deleted?

1 Like

Literally about twenty minutes ago! It’s been a bit of a panicked half hour or so…!

if it’s helpful I can give a list of affected observations, or otherwise maybe it’s a case of restoring to a certain time or something?

I don’t want to promise anything, but I would try submitting a ticket at https://help.inaturalist.org/ – if @tiwane can help, he’s likely to see either that or the post here.

3 Likes

Thanks - I really appreciate your help, even if it’s not able to work!

1 Like

If it’s helpful, any observations in GBIF have a copy of the images, e.g. https://www.inaturalist.org/observations/13627551 is here https://www.gbif.org/occurrence/1880530909

3 Likes

That is helpful - thanks very much!

if you’re going through PUT /v1/observations/{obsID} or the v2 equivalent, i think you need to include "ignore_photos":1 in your payload, or else you lose your photos if you haven’t included them in the payload.

unfortunately, even though GBIF provides a link back to the photo records and the image files, the photo records are gone at this point. so although you still have the option of getting your image files from iNat’s servers or your own device (uploading from your device might be better since they’ll include the metadata), you no longer have the better option of simply linking the photo records back to the observations.

also note that eventually the orphaned image files on iNat’s servers will probably get deleted.

it’s unfortunate that the tag you were adding seems to have been to highlight particular observations with notable photos. there’s <50 observations. so hopefully cleanup isn’t terribly difficult, however it must be done.

As it turns out, this was immensely helpful. I have all my photos stored on various hard drives, but with this website I was able to restore all but a handful of casual observations that hadn’t been copied to GBIF without having to root through storage. Thanks so much!

5 Likes

Do you test your applet on a demo version on the iNat API before running your applet on the real iNat API?

this is kind of an insensitive question. can’t we just be happy that they were able to resolve the issue at hand?

1 Like

Using demo data is a common practice in software engineering. Usually when software engineers write code to manipulate data, they first test the code on demo data. If the code works on demo data, then they apply the code to real data.

When someone uses an iNat API key to edit iNat data, I think they should take the necessary steps to reduce the chances of messing up real iNat data. One step people can take is to test their code on demo data.