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

Add the original image's extension to the WebP file name to ensure it is unique #444

Merged
merged 3 commits into from
Aug 8, 2022

Conversation

mukeshpanchal27
Copy link
Member

Summary

In this PR I use the @adamsilverstein approach, which was used in the core patch WordPress/wordpress-develop@f41c83f

Fixes #395

Relevant technical choices

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@mukeshpanchal27 mukeshpanchal27 added [Type] Bug An existing feature is broken [Focus] Images [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) no milestone PRs that do not have a defined milestone for release labels Jul 21, 2022
@mukeshpanchal27 mukeshpanchal27 self-assigned this Jul 21, 2022
Copy link
Member

@mehulkaklotar mehulkaklotar left a comment

Choose a reason for hiding this comment

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

Looks good to me! 🚀

Copy link
Contributor

@jjgrainger jjgrainger left a comment

Choose a reason for hiding this comment

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

@mukeshpanchal27 all looks good, can we create a new test to explicitly test the extension suffix?

@mukeshpanchal27 mukeshpanchal27 marked this pull request as ready for review July 21, 2022 13:17
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.

@mukeshpanchal27 Awesome, thank you!

@felixarntz felixarntz added this to the 1.4.0 milestone Jul 26, 2022
@felixarntz felixarntz removed the no milestone PRs that do not have a defined milestone for release label Jul 26, 2022
@felixarntz felixarntz changed the title Add the extension to the suffix to ensure a unique file name Add the original image's extension to the WebP file name to ensure it is unique Jul 26, 2022
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.

@mukeshpanchal27 The production logic already looks good, but I actually missed reviewing the test in more detail. As it currently is it is not a real unit test as it doesn't cover any of the changes you've made here. See my comment below.

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

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

Excellent!

Copy link
Contributor

@jjgrainger jjgrainger 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!

@mukeshpanchal27
Copy link
Member Author

Assign to @felixarntz for final review.

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.

Excellent work @mukeshpanchal27!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thumbnails not converted to webp since update 1.2.0
5 participants