Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Serve images with file extensions

Post

Serve images with file extensions

+7
−0

I've noticed that images uploaded to Codidact don't retain any meta information. That is, they don't keep either the name of the image or the image extension.

While the former isn't that bad (alt text or just plain explanation is probably better if information about the image is needed), the latter is troubling. There is no way to know what the type of the image is, whether it's a png, jpg, or other.

Browsers are able to guess the extension and display the image, but when it comes to saving, Edge and Chrome will only offer the name the site gives the image - that is, without an extension. Firefox can automatically add the extension it guessed to the file name when saving, but either way, I don't think the site should rely on browsers needing to guess the image extension.

Thus, I suggest either

  • The entire image name is saved. If name collisions are a problem, you can keep the hash thing in the URL, ex. .../9FJw5ge4D2CAh2NsTz3iPF3U/<image name>.png
  • The extension is saved (so .../9FJw5ge4D2CAh2NsTz3iPF3U.png)
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (2 comments)
General comments
ArtOfCode‭ wrote over 4 years ago

We do technically have the filename, it's just not used... I'm not sure whether this is easy or hard, because image storage is not something we have direct code control over.

Moshi‭ wrote over 4 years ago

@ArtOfCode I thought as much, since the image is on the amazon aws domain instead of the codidact domain.