Skip to content
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

Remove check that prevented resizing of large PNG images #8275

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Feb 7, 2025

This check is no longer required. The larger output files issue was resolved separately in https://core.trac.wordpress.org/ticket/36477, fixed in https://core.trac.wordpress.org/changeset/59589.

Trac ticket: https://core.trac.wordpress.org/ticket/62900


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@adamsilverstein
Copy link
Member Author

adamsilverstein commented Feb 7, 2025

All image sizes remain smaller than the original large uploaded PNG, including the full sized and large size.

image

image

Copy link

github-actions bot commented Feb 7, 2025

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@adamsilverstein adamsilverstein marked this pull request as ready for review February 7, 2025 20:39
Copy link

github-actions bot commented Feb 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adamsilverstein, mukesh27, flixos90, azaozz.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Nit-pick

src/wp-admin/includes/image.php Outdated Show resolved Hide resolved
src/wp-admin/includes/image.php Outdated Show resolved Hide resolved
src/wp-admin/includes/image.php Outdated Show resolved Hide resolved
@adamsilverstein
Copy link
Member Author

Worth reviewing without whitespace changes visible: https://github.com/WordPress/wordpress-develop/pull/8275/files?diff=unified&w=1

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

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

@adamsilverstein I think the PR looks good if that's the direction we want to take. But I think we should gather more feedback on this before proceeding.

I am not opposed by any means, but I would like us to get people that were involved in the original change from https://core.trac.wordpress.org/ticket/48736 to weigh in on whether we're now in a good place to remove the exclusion.

cc @azaozz @SergeyBiryukov

@adamsilverstein
Copy link
Member Author

I am not opposed by any means, but I would like us to get people that were involved in the original change from https://core.trac.wordpress.org/ticket/48736 to weigh in on whether we're now in a good place to remove the exclusion.

Sounds good; hopefully we can get this in before beta. I can add some unit tests here to validate the behavior,

@adamsilverstein
Copy link
Member Author

I can add some unit tests here to validate the behavior

I looked into this. I did not find a sample image on any of the previous tickets. For my own manual testing, I created a very large PNG that weighs in at over 6MB., I'm not sure this change warrants adding that much to the repo weight.

test image

new-test-large.png.zip

@azaozz
Copy link
Contributor

azaozz commented Feb 10, 2025

The larger output (PNG) files issue was resolved separately in https://core.trac.wordpress.org/ticket/36477, fixed in https://core.trac.wordpress.org/changeset/59589.

Yep, seems fixed. As far as I remember the original report was of a PNG with large dimensions but quite small file size. Tried to find one like that but couldn't, all PNGs that I tested seem to create smaller sub-sizes.

@adamsilverstein
Copy link
Member Author

The larger output (PNG) files issue was resolved separately in https://core.trac.wordpress.org/ticket/36477, fixed in https://core.trac.wordpress.org/changeset/59589.

Yep, seems fixed. As far as I remember the original report was of a PNG with large dimensions but quite small file size. Tried to find one like that but couldn't, all PNGs that I tested seem to create smaller sub-sizes.

Thanks for reviewing / testing.

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.

4 participants