Skip to content

Imgur redirector #137

@pxssy

Description

@pxssy

Say an imgur link, i.imgur.com/img_id.ext

At the moment there's a redirector that removes the current extension and reapphends the native extension the media came with. How it does this is magic to me, but i believe it looks into the img_id and extracts out the title and its native extension as it appears on imgur.

What i've found out is that img_ids are always 5 or 7 alphanumeric characters. However, it is possible to apphend an b/s/h/l at the end of img_ids to generate a thumbnail of sorts.

This is not normally problematic. However, a significant number of people do post thumbnails links accidentally. (compare http://i.imgur.com/tuKC1nz.jpg vs http://i.imgur.com/tuKC1nzh.jpg the difference is subtle but 1 cripples the redirector) To the redirector, this thumbnail img_id appears to be a 6 or 8 alphanumeric which does not exist on imgur.

This really messes up the redirector i believe, as the additional b/s/h/l misleads the redirector from being able to find the correct extension, and making it fail to download.

This should be an easy fix, since the only possible img_ids are 5 or 7, an img_id with 6 or 8 chars must necessarily be the thumbnail versions of the original photo, and need only replace away the b/s/h/l suffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions