Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect mime types, e.g. image/jpg, should be image/jpeg #174

Open
tuomassalo opened this issue Jun 3, 2022 · 0 comments
Open

Incorrect mime types, e.g. image/jpg, should be image/jpeg #174

tuomassalo opened this issue Jun 3, 2022 · 0 comments

Comments

@tuomassalo
Copy link

Describe the bug

If given e.g. https://example.com/foo.jpg, formatEnclosure gives type="image/jpg" instead of the correct MIME type image/jpeg.

I haven't checked which clients actually care about this.

To Reproduce

This behavior is already visible in the tests:

<enclosure url=\\"https://example.com/hello-world.jpg\\" length=\\"0\\" type=\\"image/jpg\\"/>

Expected behavior

The generated feed should contain:

<enclosure ... type="image/jpeg"/>

Actual behavior

The generated feed contains:

<enclosure ... type="image/jpg"/>

Versions (please complete the following information):

  • feed: 4.2.2

Additional context

The code at https://github.com/jpmonette/feed/blob/master/src/rss2.ts#L215-L223 returns the MIME type as image/[file_extension], which is correct for e.g. .png and .gif, but incorrect for e.g. .jpg and .svg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant