MimeType not working!?
See original GitHub issueDescribe the bug
I’ve tried to display .webp images instead of jpeg to reduce file size but I can’t.
Tried
defaultOptions
set default parameter contentType: outputContentType = MimeType.WEBP in sharpTransformer
move .webp() resize to right after image.resize, before .jpeg()
nothing works.
set options={{contentType: MimeType.WEBP}}
does add &contentType=image/webp to the URL
But the responses are all image/jpeg
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Describe above
Expected behavior
Response image/webp
Screenshots or Videos
No response
Platform
- OS: [Windows]
- Browser: [Chrome]
- Version: [100.0.4896.127 (Official Build) (64-bit)]
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Mime type not working - Stack Overflow
I have searched mime types for zip,apk files but they are not working for me (gives error -invalid format as per my code...
Read more >Properly configuring server MIME types - MDN Web Docs
If you're using the Apache web server, check the Media Types and Character Encodings section of Apache Configuration: .htaccess for examples of ...
Read more >Mime Type Check not working as expected
Solved: Hi All, I have a some strange behaviour taking place on a basic form I have created on PowerApps Portals.
Read more >Error message "File type not permitted or mime type does not ...
When an application searches for the MIME type of a file, the application checks the filename against the MIME information files.
Read more >MIME Type and Uploaded File Type Detection Problem
When selecting a file from input[type=file] , the file type is already determined by the browser (user-agent) follow MIME type format and then ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Found the issue, one moment!
@Josh-McFarlin Yes, this is a case when I do not want to resize, but only to change file format. I agree, we should use it with resizing though - that is why I believe the
responsive
should never be empty. It should not have?
here:https://github.com/Josh-McFarlin/remix-image/blob/master/src/components/Image/Image.tsx#L9
Moreover we could type it as follows:
to make sure at least one
responsive
object was set. I am not sure, that is just quick thought 🤔