Skip to content

Suggestion: Add a flag to disable mapping the media URL to params (.png to ?format=png) #185

Description

@0x-DLN

My use case is that I'm also archiving tweets, in case they get deleted. I'm storing them in buckets (like AWS S3) in a filename.extension format, so like image.jpg, video.mp4, etc.

The problem I'm running into is that for images the URL gets mapped to filename?format=extension&name=small, e.g. image?format=jpg&name=small. From my testing, when using the X/Twitter CDN both variants work, and return the exact same image.

I propose adding an optional flag to MediaImgProps which gets passed down to getMediaUrl to make the URL params conditional.

The flag's default value should keep the current functionality.

If this conceptually sounds okay, I'll make a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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