Repository navigation
Fixes palette-based PNG uploads failing original full-size AVIF/WebP conversion under GD #2024
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
Merged
westonruter
merged 24 commits into
WordPress:trunk
from
b1ink0:fix/palette-pngs-to-avif-webp-conversion
Aug 19, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4d54810
Add function to convert palette PNGs to true color during upload
b1ink0 82cf154
Refactor to use `imagepalettetotruecolor()` to convert uploaded palet…
b1ink0 cf97730
Add test for converting palette PNG to truecolor
b1ink0 8ad675c
Add hooks for palette PNG to truecolor conversion and tests for those…
b1ink0 85482bc
Merge branch 'trunk' into fix/palette-pngs-to-avif-webp-conversion
b1ink0 ef9a9f9
Add type safety guard for palette PNG conversion filter
b1ink0 7443e68
Improve PNG type checking
b1ink0 731d3b0
Fix typo in function description "true color" to "truecolor"
b1ink0 7f757c7
Separate image creation failure and truecolor checks for clarity
b1ink0 e646941
Refactor test for palette PNG conversion to remove unnecessary setup …
b1ink0 56e8dac
Add test to assert converted image filesize does not exceed original
b1ink0 9ff40f2
Remove unused import
b1ink0 d930ea9
Improve test code coverage
b1ink0 2b1d612
Merge branch 'trunk' into fix/palette-pngs-to-avif-webp-conversion
adamsilverstein ca8599c
Remove redundant GD function checks
b1ink0 8244cae
Return non-array file parameter unchanged
b1ink0 62f767c
Fix PHPStan and test failures caused by returning a mixed value
b1ink0 e39b2c7
Improve file type check by using `wp_check_filetype_and_ext`
b1ink0 37b893b
Merge branch 'trunk' into fix/palette-pngs-to-avif-webp-conversion
b1ink0 70ad323
Merge branch 'trunk' into fix/palette-pngs-to-avif-webp-conversion
adamsilverstein 8f8a614
Convert invalid input to empty array
b1ink0 aa4c927
Merge branch 'trunk' of https://github.com/WordPress/performance into…
westonruter 7e6e70c
Skip test if GD extension is not loaded
westonruter 15fd0ea
Address minor static analysis nits
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.