BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Add `.webp` as a default mime type for CommandBox to support this new image format

Description

Add .webp as a default mime type for CommandBox to support this new image format https://beamtic.com/webp-mime-type

Activity

Show:

Brad WoodDecember 29, 2022 at 8:33 PM

I have added webp as a default mapping in the mean time in Runwar.

Brad WoodDecember 29, 2022 at 8:26 PM

It does not appear Undertow has a default MIME type for webp files. I entered this ticket for them to add it:

https://issues.redhat.com/browse/UNDERTOW-2218

Brad WoodDecember 21, 2022 at 5:50 PM

In the mean time, you can set the MIME type with

  • A web.xml override for the stable version of CommandBox

  • A new server.json setting in the bleeding edge version of CommandBox

https://ortussolutions.atlassian.net/browse/COMMANDBOX-1345

Brad WoodDecember 21, 2022 at 5:49 PM

Ok, that’s more helpful. So it’s the content type that’s wrong. We use Undertow’s default MIME list (though we have the ability to add our own) so I’m surprised Undertow’s core doesn’t have this one already. I’ll check to see if something is configured wrong with Undertow, and if not I’ll add in our own MIME override for it.

Luis MajanoDecember 21, 2022 at 1:44 PM

The issue is that it doesn’t behave like an image, but a binary. So you can embed it via an img tag, but if you try to view it, it downloads instead of rendering. We just need to add the image/webp mime type to the default list.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created December 20, 2022 at 7:00 PM
Updated December 29, 2022 at 8:33 PM
Resolved December 29, 2022 at 8:33 PM

Flag notifications