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.

Mobile browser cannot open older Codidact images

+2
−0

Difference between older images and recent images

Following a link to the url of an image uploaded to Codidact redirects to an AWS link for recently uploaded images. For older images, following the link instead starts a file download. On desktop this downloaded file opens as an image, but on mobile the downloaded file is not recognised as an image and will not open. On Firefox for Android this results in an incorrect file type being guessed (there is an automatically appended .bin in the filename) while on Chrome for Android no file extension is added. In both cases the file will not open.

The example image links are taken from Meta posts. For convenience I have edited both posts so that in each case the image is a link to the standalone image. This means you can click the image on desktop or tap the image on mobile and it will open the standalone image.

Note that clicking or tapping an image in most Codidact posts will have no effect. In those cases you can get a link by right clicking/long pressing and selecting "Copy Image Link". Exact wording may vary between browsers.

Recent Meta post

Older Meta post

Redirect with recent images

Clicking/tapping the image or pasting the URL of the image into a new browser tab (desktop or mobile) results in being redirected to a new URL, which displays the image in the browser.

Original URL

https://meta.codidact.com/uploads/3sifm64vlhqhz84vk97lkbu6kl8a

Redirected URL

https://s3.amazonaws.com/storage.codidact.com/3sifm64vlhqhz84vk97lkbu6kl8a

Download with older images

Clicking/tapping the image or pasting the URL of the image into a new browser tab (desktop or mobile) results in a file being downloaded.

URL

https://meta.codidact.com/uploads/gl22tann626tcy50n0mq340osonb

Filename on Firefox for desktop

gl22tann626tcy50n0mq340osonb

Filename on Firefox for Android

gl22tann626tcy50n0mq340osonb.bin

Note the .bin extension that has been added on mobile. My mobile gives an error message saying it has no app to open .bin files. Renaming the file to remove to .bin still results in my mobile being unable to display the image.

(Note that as mentioned, Chrome for Android does not add a file extension, but is also unable to display the image.)

Renaming the file to have an extension of either .png or .jpg (at least one of which must be incorrect) results in my mobile displaying the image correctly. The fact that it can display the image correctly even with an incorrect image file extension suggests that it is getting the image type (PNG or JPEG) from the file content, rather than from the file extension. It just seems to struggle when there is no extension or a non-image extension such as .txt.

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

Related: [Serve images with file extensions](https://meta.codidact.com/posts/278103) (3 comments)

0 answers

Sign up to answer this question »