Skip to content

Conversation

@peterwilsoncc
Copy link
Contributor

@peterwilsoncc peterwilsoncc commented Jul 28, 2022

Summary

Ensure the WebP fallback JavaScript works with sites using plain permalinks.

Fixes #456.

Relevant technical choices

I decided to copy the approach used in the @wordpress/apiFetch rootUrl middleware that handles this exact issue. It seems to work.

Ensures that the querystring does not have a double ? if the site is configured using plain permalinks.

Checklist

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

@peterwilsoncc peterwilsoncc added [Type] Bug An existing feature is broken [Focus] Images no milestone PRs that do not have a defined milestone for release labels Jul 28, 2022
@mxbclang mxbclang removed the no milestone PRs that do not have a defined milestone for release label Jul 28, 2022
@mukeshpanchal27 mukeshpanchal27 added this to the 1.4.0 milestone Jul 28, 2022
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.

Thanks @peterwilsoncc looks good

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.

Nice!

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.

🚀

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.

@peterwilsoncc Great catch, thanks!

@felixarntz felixarntz merged commit f828649 into trunk Aug 8, 2022
@felixarntz felixarntz deleted the fix/456-rest-route branch August 8, 2022 14:19
@swissspidy swissspidy added [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) and removed [Module] WebP Support labels Jul 26, 2024
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.

WebP Module fallback.js does not support REST API plain permalinks.

8 participants