Rename image files storaged in aws instead of "original.jpeg" etc

Platform(s), such as mobile, website, API, other:
Website
URLs (aka web addresses) of any pages, if relevant:
https://inaturalist-open-data.s3.amazonaws.com/photos/238838746/original.jpeg
Description of need:
Describe the iNaturalist community need that your requested feature addresses. Include screenshots, URLs, and other details to help us all understand the issue.
iNaturalist stores images with the same file name like “original.jpeg, large.jpeg, etc”. However when downloading images it is not convenient to rename files manually (otherwise there will be many duplicate “original.jpeg”, brower may rename them as “original(1).jpeg or simply delete previous one”).
Feature request details:
In detail, describe the feature you are requesting. This includes its functionality, where the feature is implemented, and what it might look like. Screenshots or mock-ups are helpful. The idea is to have a concrete and actionable request which the community can discuss and vote on. It might change through discussion, but it’s much easier to iterate and talk about something specific.
Is it possible to change the name of image files storaged in aws instead of “original.jpeg” etc? If with image ID it will be better. For example rename the file as “ID-original.jpeg” (https://inaturalist-open-data.s3.amazonaws.com/photos/238838746/238838746-original.jpeg instead of https://…/238838746/original.jpeg) so that file name of downloaded images can be easily correspond to images on website.

This is what I replied to an iNat staff Tony. I didn’t realized it was private coversation so I paste it here publicly to help others understand the case:
Hi Tony,
I download images manually, maybe a few images in an observation.
For example, there are 5 images in an observation:
EXAMPLE OBSERVATION
If I want to download them all for educational purpose, I have to right click → save image as → rename the image manually from “original.jpeg”. Because all the image URLs stored in iNat are end with “original.jpeg” etc, for example “https://inaturalist-open-data.s3.amazonaws.com/photos/238838746/original.jpeg”, I have to copy the ID number in the URL (238838746 in this case) and paste it to the file name input box, so that image will be saved as “238838746.jpeg”.
The main purpose of saving images’ file name as ID number is making sure I can find where the image I downloaded from previously. A “238838746.jpeg” in my disk is easier than an “original.jpeg”.
Best regards,
Sun

2 Likes

i don’t really understand the need for this kind of change. if you’re manually downloading the files, i assume you would be downloading only a few, and in that case, your existing process seems not to be a huge burden. if you’re going to be downloading more than that, i would think you would want to use a process that will automate a lot of this, and if you’re going to be automating, you can automate the process of naming the downloaded files to whatever format you like.

how many images do you plan to download?

Even if you download just a handful of files (e.g. 10) it’s still a PITA to have to rename each one every time.

I am actually surprised that these files aren’t already named based on the obs/pic ID e.g. 123456_1_original.jpeg

1 Like

you wouldn’t want to store them on the server based on observation ID because one observation can have many photos, and a single photo can be used by multiple observations.

if you want to store them based on observation ID for your own personal use, that’s fine, but i think the varying preferences here just kind of prove why it doesn’t really make things better to change the way the files are stored on the server.

1 Like

I edited my post to take multiple photos into account - I think you must have missed that change :)

Also you don’t need to store them on the server with a particular filename. You just need to generate them for download with that filename.

so now you want to add download button to the photo page that will download the file using your naming convention? i guess you can request that feature, but that’s different than what the original proposal here is.

2 Likes

Sigh. No.

1 Like

I don’t have a strong feeling about this request (I agree that for bulk downloads, writing a script that renames how you want makes the most sense).

BUT, if the file names are changed, I would suggest doing away with the “original” name stub since it has lead to confusion in the past and isn’t correct for many photos. Since iNat downsizes larger pics for storage, many/most that download as “original” aren’t actually original. Some users have thought that they are though because of that “original” stub. Maybe something like “max” or other signifier that the size is the largest option iNat offers, etc.

The image url already contains all the necessary infornation, since the path element includes the photo ID. The issue here is that the browser is generating the save-as filename, not the web page. The browser could generate a filename based on the last two elements of the url path, but it doesn’t. Changing this behvaiour would require a browser extension. The only other alternative, as has already been suggested, would be to add some kind of download feature to the web page itself. This could actually be done fairly easily with a userscript extension. All that’s needed is to insert a link on the page with a data-url containing the image data and a download attribute with the desired filename.

1 Like

If you’re already typing a lot (like with the URL shown) maybe using a CLI tool like wget might be an option?

as someone who regularly saves photos from iNaturalist, this would be a nice quality of life improvement. filename should be something like “observation#_photo#.jpg”

This would represent a big change but it’s something we support. There are several other improvements we’d like to make surrounding photos, and it would probably happen along with those other changes. So yes, not going to be addressed in the near future, but it’s on the drawing board.

3 Likes