Skip to content

Add WebP support#3856

Merged
sbrunner merged 1 commit intomasterfrom
webp-master-GSCAR-159
Nov 24, 2025
Merged

Add WebP support#3856
sbrunner merged 1 commit intomasterfrom
webp-master-GSCAR-159

Conversation

@sbrunner
Copy link
Copy Markdown
Member

@sbrunner sbrunner commented Nov 20, 2025

Fix #3853

See JIRA issue: GSCAR-159.

@sbrunner sbrunner marked this pull request as draft November 20, 2025 12:06
@sbrunner sbrunner force-pushed the webp-master-GSCAR-159 branch 3 times, most recently from 23a6f61 to 9775d31 Compare November 20, 2025 14:45
@sbrunner sbrunner mentioned this pull request Nov 20, 2025
@sbrunner sbrunner added the backport 3.33 Add this label to backport the pull request to the '3.33' branch label Nov 20, 2025
@sbrunner sbrunner force-pushed the webp-master-GSCAR-159 branch from 9775d31 to 3d87e50 Compare November 20, 2025 15:33
@sbrunner sbrunner marked this pull request as ready for review November 20, 2025 15:48
@sbrunner sbrunner requested review from Copilot and sebr72 November 20, 2025 15:48
@sbrunner
Copy link
Copy Markdown
Member Author

Finally I required an external dependency do you aggree that it can be backported anyway?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the WebP image format to Mapfish Print 3 by integrating the TwelveMonkeys ImageIO WebP plugin. The implementation uses a property-based activation mechanism (mapfish.image.plugins=true) to scan for and register ImageIO plugins at application startup.

Key Changes

  • Added ImageInit class to register WebP ImageIO plugin at startup when enabled via system property
  • Added comprehensive documentation for the new mapfish.image.plugins property
  • Included integration test with WebP test image and expected output

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core/src/main/java/org/mapfish/print/ImageInit.java New initialization class that registers WebP ImageIO plugin when property is enabled
core/src/main/webapp/WEB-INF/mapfish-print-servlet.xml Registers ImageInit bean for startup initialization
core/build.gradle Adds TwelveMonkeys ImageIO WebP library dependency (version 3.12.0)
docs/src/main/resources/templates/properties.html New documentation page listing Java system properties including the new mapfish.image.plugins property
docs/src/main/resources/templates/_main.html Reorders navigation menu to place Properties before Configuration
docs/src/main/resources/pages.json Adds properties page to documentation configuration
docker-compose.yaml Enables image plugins in Docker environment via JAVA_OPTS
examples/src/test/resources/examples/image_layer_test/requestData-webp.json Integration test configuration for WebP image layer
examples/src/test/resources/examples/image_layer_test/expected_output/requestData-webp.png Expected test output for WebP image rendering
examples/geoserver-data/www/GeoServer.webp Test WebP image asset

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sbrunner sbrunner force-pushed the webp-master-GSCAR-159 branch from 3d87e50 to f4e4b98 Compare November 21, 2025 07:36
Copy link
Copy Markdown
Contributor

@sebr72 sebr72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks. Only one minor clarification in comment or class name.

@sbrunner sbrunner force-pushed the webp-master-GSCAR-159 branch from f4e4b98 to 6e25be5 Compare November 24, 2025 08:36
@sbrunner sbrunner merged commit 28677ed into master Nov 24, 2025
15 checks passed
@sbrunner sbrunner deleted the webp-master-GSCAR-159 branch November 24, 2025 10:25
@geo-ghci-int geo-ghci-int bot removed the backport 3.33 Add this label to backport the pull request to the '3.33' branch label Nov 24, 2025
@geo-ghci-int geo-ghci-int bot added this to the 4.0.0 milestone Feb 13, 2026
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

Successfully merging this pull request may close these issues.

WebP Support

3 participants