Skip to content

Conversation

@Dongnyoung
Copy link
Contributor

Hello,

Motivation

image/webp is a widely adopted media type across browsers, CDNs, and mobile platforms.
Currently, developers often hardcode "image/webp" in produces declarations.
Adding MediaType.IMAGE_WEBP and IMAGE_WEBP_VALUE improves consistency with other image media types and avoids string literals.

Changes

  • Added MediaType.IMAGE_WEBP and IMAGE_WEBP_VALUE in spring-web.
  • Javadoc aligned with existing constants (e.g. IMAGE_PNG_VALUE).
  • Added MediaTypeTests#imageWebpConstants for verification.

Compatibility

  • Additive change only.
  • No behavior changes, no removals, fully backwards compatible.

Thanks for the review!

Dongnyoung added 7 commits May 6, 2025 20:12
…ttpRequest

This pull request fixes a grammatical mistake in the JavaDoc of the setResponse method in MockClientHttpRequest.

- Original: "the this request"
- Changed to: "this request"

This change improves the clarity and quality of the documentation.

Signed-off-by: DongNyoung Lee <[email protected]>
Fix grammatical error in JavaDoc of setResponse method in MockClientHttpRequest.
Signed-off-by: DongNyoung Lee <[email protected]>
Signed-off-by: DongNyoung Lee <[email protected]>
@bclozel
Copy link
Member

bclozel commented Sep 10, 2025

Thanks for the suggestion, but these days we're trying to keep the number of values low here - even if the media type is well known, we tend to add values only if Spring uses it for building a specific feature or support.

See #29613 #26087 #25491 #2055 #1589 #1054 and more

@bclozel bclozel closed this Sep 10, 2025
@bclozel bclozel added the status: declined A suggestion or change that we don't feel we should currently apply label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants