Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

BREAKING: Use path as URL instead of /resize/:width/:height #5

Merged
merged 4 commits into from
Oct 3, 2019

Conversation

zetlen
Copy link

@zetlen zetlen commented Oct 3, 2019

Switch to an API closer to Sharp's parameters.

  • Pathnames like /resize/480 are nonintuitive and defeat a lot of cache mechanisms.
  • This approach is closer to other image optimizing APIs, allowing some potential fall-through in general purpose apps.

@zetlen zetlen added the BREAKING label Oct 3, 2019
@zetlen zetlen merged commit bae74df into develop Oct 3, 2019
@zetlen zetlen deleted the zetlen/use-path-as-url branch October 3, 2019 15:59
zetlen pushed a commit to magento/pwa-studio that referenced this pull request Oct 3, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.
zetlen pushed a commit to magento/pwa-studio that referenced this pull request Oct 3, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.
zetlen pushed a commit to magento/pwa-studio that referenced this pull request Oct 4, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
zetlen pushed a commit to magento/pwa-studio that referenced this pull request Oct 4, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
zetlen pushed a commit to magento/pwa-studio that referenced this pull request Oct 7, 2019
The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes
dpatil-magento pushed a commit to magento/pwa-studio that referenced this pull request Oct 10, 2019
* feat: Simplify image middleware with express-sharp update

The express-sharp library has updated to v3.0.0, which includes a
[breaking
change](magento-research/express-sharp#5) to the
URL scheme, and therefore the public API of the library.

This helps us simplify the code in addImgOptMiddleware, because we don't
have to rewrite the URL as aggressively--it's closer to the Fastly
paradigm.

Closes #1808, and some other issues.

test: coverage for addImgOptMiddleware changes

* fix: WebP content negotiation. Closes #1842

* fixup prettier
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant